From: Sapan Bhatia Date: Fri, 11 Feb 2011 03:28:26 +0000 (-0500) Subject: Monitor the default interface, which is not necessarily eth0 X-Git-Tag: iptables-1.4.10-3~4 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8db75c6086db1e90729b9bf096ee8ea2167794e2;p=iptables.git Monitor the default interface, which is not necessarily eth0 --- diff --git a/iptables.spec b/iptables.spec index dd14149..d7c022b 100644 --- a/iptables.spec +++ b/iptables.spec @@ -117,6 +117,8 @@ rm -rf %{buildroot} %post /sbin/ldconfig /sbin/chkconfig --add iptables +DEFAULT_IFACE=$(ip route show default | awk '/default/ {print $5}' +sed -i -e "s;__eth;$DEFAULT_IFACE;g" /etc/sysconfig/iptables service iptables restart %postun -p /sbin/ldconfig diff --git a/planetlab-config b/planetlab-config index b5954cf..ac5c016 100644 --- a/planetlab-config +++ b/planetlab-config @@ -18,5 +18,5 @@ COMMIT -A INPUT -j MARK --copy-xid 0x0 -A POSTROUTING -j MARK --copy-xid 0x0 -A POSTROUTING -j CLASSIFY --set-class 0001:1000 --add-mark --A POSTROUTING -o eth0 -j ULOG --ulog-cprange 54 --ulog-qthreshold 16 +-A POSTROUTING -o __eth -j ULOG --ulog-cprange 54 --ulog-qthreshold 16 COMMIT