c23c09981c4feb144cb7e7a3c4bc1b9e1ced3a8c
[strongswan.git] / testing / tests / sql / shunt-policies-nat-rw / pretest.dat
1 alice::rm /etc/ipsec.d/cacerts/*
2 venus::rm /etc/ipsec.d/cacerts/*
3 sun::rm /etc/ipsec.d/cacerts/*
4 alice::cat /usr/local/share/strongswan/templates/database/sql/sqlite.sql /etc/ipsec.d/data.sql > /etc/db.d/ipsec.sql
5 venus::cat /usr/local/share/strongswan/templates/database/sql/sqlite.sql /etc/ipsec.d/data.sql > /etc/db.d/ipsec.sql
6 sun::cat /usr/local/share/strongswan/templates/database/sql/sqlite.sql /etc/ipsec.d/data.sql > /etc/db.d/ipsec.sql
7 alice::cat /etc/db.d/ipsec.sql | sqlite3 /etc/db.d/ipsec.db
8 venus::cat /etc/db.d/ipsec.sql | sqlite3 /etc/db.d/ipsec.db
9 sun::cat /etc/db.d/ipsec.sql | sqlite3 /etc/db.d/ipsec.db
10 sun::iptables-restore < /etc/iptables.rules
11 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
12 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
13 alice::ipsec start
14 venus::ipsec start
15 sun::ipsec start
16 alice::expect-connection nat-t
17 venus::expect-connection nat-t
18 sun::expect-connection nat-t
19 alice::ipsec up nat-t
20 venus::ipsec up nat-t