I was running a scan with Lynis on a RHEL 7 box and it said that an interface was in promiscuous mode. I checked and determined that the links were not based on not having the Promuscuous flag (only Broadcast, multicast, running, and UP (BMRU) are visible):
$ ip link show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
$ ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
$ netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 9001 17217705 0 0 0 17899485 0 0 0 BMRU
So I looked at how Lynis was checking and it runs the command ip link -o -d show dev eth0 | grep 'promiscuity 1'
and sure enough, I find the following:
$ ip -d link show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff promiscuity 1 addrgenmode eui64 numtxqueues 8 numrxqueues 8 gso_max_size 65536 gso_max_segs 65535
My question is which is more authoritative. I'm used to just checking the flags and not the interface properties. What does promiscuity 1
mean? Is this interface promiscuous?
ip -d link
, what does that mean?ifconfig
will ever showPROMISC
in flags. Nor willip link
show thepromiscuity
flag unless given the-d
("detailed") switch. And runningtcpdump
on any interface (which makes it promiscuous), and checking withifconfig
andip link show
supports that.promiscuity 1
is just howip link
shows theIFF_PROMISC
flag ;-) An interface will be put in promiscuous mode by network monitoring tools liketcpdump
orwireshark
, but also by some vm software which "injects" packets directly into an existing interface, without using tap interfaces, etc.tcpdump
. Promiscuity 2 or 3 (if ever printed) means exactly the same as 1: that the interface is in promiscuous mode. See also this patch