From 8db75c6086db1e90729b9bf096ee8ea2167794e2 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Thu, 10 Feb 2011 22:28:26 -0500 Subject: [PATCH] Monitor the default interface, which is not necessarily eth0 --- iptables.spec | 2 ++ planetlab-config | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- 2.43.0