testing: Change sql scenarios to swanctl
[strongswan.git] / testing / tests / sql / shunt-policies-nat-rw / pretest.dat
1 alice::cat /usr/local/share/strongswan/templates/database/sql/sqlite.sql /etc/ipsec.d/data.sql > /etc/db.d/ipsec.sql
2 venus::cat /usr/local/share/strongswan/templates/database/sql/sqlite.sql /etc/ipsec.d/data.sql > /etc/db.d/ipsec.sql
3 sun::cat /usr/local/share/strongswan/templates/database/sql/sqlite.sql /etc/ipsec.d/data.sql > /etc/db.d/ipsec.sql
4 alice::cat /etc/db.d/ipsec.sql | sqlite3 /etc/db.d/ipsec.db
5 venus::cat /etc/db.d/ipsec.sql | sqlite3 /etc/db.d/ipsec.db
6 sun::cat /etc/db.d/ipsec.sql | sqlite3 /etc/db.d/ipsec.db
7 sun::iptables-restore < /etc/iptables.rules
8 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
9 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
10 sun::service charon start 2> /dev/null
11 alice::service charon start 2> /dev/null
12 venus::service charon start 2> /dev/null
13 sun::expect-connection nat-t
14 alice::expect-connection nat-t
15 alice::swanctl --initiate --child nat-t 2> /dev/null
16 venus::expect-connection nat-t
17 venus::swanctl --initiate --child nat-t 2> /dev/null