]> git.ipfire.org Git - people/ms/strongswan.git/blob - testing/tests/ikev2/compress-nat/pretest.dat
testing: Fixed pretest script of ikev1/rw-psk-aggressive scenario
[people/ms/strongswan.git] / testing / tests / ikev2 / compress-nat / pretest.dat
1 alice::iptables-restore < /etc/iptables.rules
2 carol::iptables-restore < /etc/iptables.rules
3 bob::iptables-restore < /etc/iptables.rules
4 moon::iptables-restore < /etc/iptables.rules
5 sun::iptables-restore < /etc/iptables.rules
6 moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -p udp -j SNAT --to-source PH_IP_MOON:1100-1200
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 moon::iptables -A FORWARD -i eth1 -o eth0 -s 10.1.0.0/16 -j ACCEPT
9 moon::iptables -A FORWARD -i eth0 -o eth1 -d 10.1.0.0/16 -j ACCEPT
10 sun::iptables -t nat -A POSTROUTING -o eth0 -s 10.2.0.0/16 -p udp -j SNAT --to-source PH_IP_SUN:1200-1300
11 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
12 sun::iptables -A FORWARD -i eth1 -o eth0 -s 10.2.0.0/16 -j ACCEPT
13 sun::iptables -A FORWARD -i eth0 -o eth1 -d 10.2.0.0/16 -j ACCEPT
14 carol::systemctl start strongswan
15 alice::systemctl start strongswan
16 bob::systemctl start strongswan
17 carol::expect-connection hub
18 alice::expect-connection hub
19 bob::expect-connection hub
20 alice::swanctl --initiate --child hub 2> /dev/null
21 bob::swanctl --initiate --child hub 2> /dev/null