find interface in absence of default gateway

This commit is contained in:
Marco Ochse 2016-08-10 00:51:34 +02:00 committed by GitHub
parent f72af08666
commit b6707b70ba

View file

@ -89,7 +89,7 @@ fuSURICATA () {
chmod 760 -R /data/suricata
chown tpot:tpot -R /data/suricata
# Get IF, disable offloading, enable promiscious mode
myIF=$(route | grep default | awk '{ print $8 }')
myIF=$(ip route | grep $(hostname -I | awk '{print $1 }') | awk '{print $3 }')
/sbin/ethtool --offload $myIF rx off tx off
/sbin/ethtool -K $myIF gso off gro off
/sbin/ip link set $myIF promisc on