From: Andy Bavier Date: Mon, 18 May 2009 14:51:37 +0000 (+0000) Subject: Add subnet for external NAT interface X-Git-Tag: vsys-scripts-0.95-2~4 X-Git-Url: http://git.onelab.eu/?p=vsys-scripts.git;a=commitdiff_plain;h=4a7889b28511907d943342fca48927bbe3e76e11 Add subnet for external NAT interface --- diff --git a/exec/setup-nat b/exec/setup-nat index e703f5d..9a0c4f5 100755 --- 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 -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