Re: promiscuous mode

This is a discussion on Re: promiscuous mode within the Linux Networking forums, part of the Linux Forums category; "Gregor Rot" <gregor.rot@siol.net> wrote in news:HPRMa.1997$78.132750@news.siol.net: &...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-05-2003
Peteris Krumins
 
Posts: n/a
Default Re: promiscuous mode

"Gregor Rot" <gregor.rot@siol.net> wrote in
news:HPRMa.1997$78.132750@news.siol.net:

> Hi,
>
> i would like to check if interfaces are in promiscuous mode, and
> eventually, put then in not-promiscuous mode...how do i do that under
> Debian?
>
> tnx,
> Greg


s[tupid]imple script:
--
#!/bin/bash

if [ -z $1 ]; then
echo "usage: $0 <interface>" $'\n'"example: $0 eth0";
exit 1;
fi

/sbin/ifconfig $1 | grep -i promisc 1>/dev/null 2>&1
if [ $? -eq 0 ]; then
/sbin/ifconfig $1 -promisc
if [ $? -gt 0 ]; then
echo "failed setting $1 in non-promisc mode"
exit 1;
else
echo "$1 set in non-promisc mode"
exit 0;
fi
else
echo "$1 not running in promiscious mode"
exit 1;
fi
--


P.Krumins
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0