]> git.ipfire.org Git - thirdparty/strongswan.git/blob - testing/tests/double-nat-net/pretest.dat
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / testing / tests / double-nat-net / pretest.dat
1 alice::/etc/init.d/iptables start 2> /dev/null
2 bob::/etc/init.d/iptables start 2> /dev/null
3 bob::echo 1 > /proc/sys/net/ipv4/ip_forward
4 moon::echo 1 > /proc/sys/net/ipv4/ip_forward
5 sun::echo 1 > /proc/sys/net/ipv4/ip_forward
6 moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -p udp -j SNAT --to-source PH_IP_MOON:1024-1100
7 moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -p tcp -j SNAT --to-source PH_IP_MOON:2000-2100
8 sun::iptables -t nat -A POSTROUTING -o eth0 -s 10.2.0.0/16 -p tcp -j SNAT --to-source PH_IP_SUN:2000-2100
9 sun::iptables -t nat -A PREROUTING -i eth0 -s PH_IP_MOON -p udp -j DNAT --to-destination PH_IP_BOB
10 sun::ip route add 10.1.0.0/16 via PH_IP_BOB
11 alice::ipsec start
12 bob::ipsec start
13 alice::sleep 2
14 alice::ipsec up nat-t
15