git://git.onelab.eu
/
vsys-scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
df75246
)
Add subnet for external NAT interface
author
Andy Bavier
<acb@cs.princeton.edu>
Mon, 18 May 2009 14:51:37 +0000
(14:51 +0000)
committer
Andy Bavier
<acb@cs.princeton.edu>
Mon, 18 May 2009 14:51:37 +0000
(14:51 +0000)
exec/setup-nat
patch
|
blob
|
history
diff --git
a/exec/setup-nat
b/exec/setup-nat
index
e703f5d
..
9a0c4f5
100755
(executable)
--- a/
exec/setup-nat
+++ b/
exec/setup-nat
@@
-8,7
+8,7
@@
read KEY
ETUN0=nat$KEY
ETUN1=natx$KEY
ip link add name $ETUN0 type veth peer name $ETUN1
ETUN0=nat$KEY
ETUN1=natx$KEY
ip link add name $ETUN0 type veth peer name $ETUN1
-ifconfig $ETUN1 10.0.$KEY.1 up
+ifconfig $ETUN1 10.0.$KEY.1
/24
up
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o $ETUN1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o $ETUN1 -m state --state RELATED,ESTABLISHED -j ACCEPT