X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=exec%2Fsetup-nat;h=9a0c4f5e2e8f0b26ade91f19a53839179185e1ec;hb=0d2dadd8ffce4fb1f1de7270766b65d748a04b30;hp=5955868453de3c5be719f7ecae3a8a635c6e5119;hpb=c0aaafa7ae3daf7ed9c6ca1459fc28a32b0fceff;p=vsys-scripts.git diff --git a/exec/setup-nat b/exec/setup-nat index 5955868..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 @@ -23,7 +23,7 @@ cat > $GRAB <