git://git.onelab.eu
/
nodemanager-topo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
23aba51
)
Scripts for creating and deleting NAT interface inside a sliver
author
Andy Bavier
<acb@cs.princeton.edu>
Fri, 20 Feb 2009 20:27:28 +0000
(20:27 +0000)
committer
Andy Bavier
<acb@cs.princeton.edu>
Fri, 20 Feb 2009 20:27:28 +0000
(20:27 +0000)
teardown-nat
[new file with mode: 0644]
patch
|
blob
diff --git a/teardown-nat
b/teardown-nat
new file mode 100644
(file)
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
+
+
+