Decided to make this an API call.
[nodemanager-topo.git] / teardown-nat
1 #!/bin/sh
2
3 KEY=$1
4 ETUN1=natx$KEY
5
6 # Remove iptables rules
7 /sbin/iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
8 /sbin/iptables -D FORWARD -i eth0 -o $ETUN1 -m state --state RELATED,ESTABLISHED -j ACCEPT
9 /sbin/iptables -D FORWARD -i $ETUN1 -o eth0 -j ACCEPT
10
11 # Get rid of etun devices, only need name of one of them
12 echo $ETUN1 > /sys/module/etun/parameters/delif
13
14
15