From b6707b70bab0a701d688a92efee7384052869d23 Mon Sep 17 00:00:00 2001 From: Marco Ochse Date: Wed, 10 Aug 2016 00:51:34 +0200 Subject: [PATCH] find interface in absence of default gateway --- installer/bin/clean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/bin/clean.sh b/installer/bin/clean.sh index 5e45287c..6d573a4d 100755 --- a/installer/bin/clean.sh +++ b/installer/bin/clean.sh @@ -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