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: &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
"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 |