X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=teardown-nat;fp=teardown-nat;h=c1029b4f1bf3539d21399387a327074eab053fe0;hb=4604bdc01a5aae81e7b17440f11ee6c555601bbc;hp=0000000000000000000000000000000000000000;hpb=23aba513795b0fe75632eccb808bfb891e9603a8;p=nodemanager-topo.git diff --git a/teardown-nat b/teardown-nat new file mode 100644 index 0000000..c1029b4 --- /dev/null +++ b/teardown-nat @@ -0,0 +1,15 @@ +#!/bin/sh + +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 + +# Get rid of etun devices, only need name of one of them +echo $ETUN1 > /sys/module/etun/parameters/delif + + +