X-Git-Url: http://git.onelab.eu/?p=nodemanager-topo.git;a=blobdiff_plain;f=teardown-nat;h=2d09d55b1afb36aebf80e9eb5bedadb3e8835feb;hp=c237338d148a272c14e385e1af136f593aed2ab3;hb=HEAD;hpb=f6ed4fcd49097356b5f23143e1df6fc7eb20dcb4 diff --git a/teardown-nat b/teardown-nat index c237338..2d09d55 100644 --- a/teardown-nat +++ b/teardown-nat @@ -3,10 +3,9 @@ KEY=$1 ETUN1=natx$KEY -# Remove iptables rules -/sbin/iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE -/sbin/iptables -D FORWARD -i eth0 -o $ETUN1 -m state --state RELATED,ESTABLISHED -j ACCEPT -/sbin/iptables -D FORWARD -i $ETUN1 -o eth0 -j ACCEPT +iptables -t mangle -D PREROUTING -i $ETUN1 -j CONNMARK --set-mark $KEY + +ip rule del dev eth0 fwmark $KEY table $KEY # Get rid of etun devices, only need name of one of them ip link delete dev $ETUN1