testing: Globally define logging via syslog for charon-systemd
[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 alice::cd /etc/swanctl; rm -r rsa/* x509/* x509ca/*
8 venus::cd /etc/swanctl; rm -r rsa/* x509/* x509ca/*
9 sun::cd /etc/swanctl; rm -r rsa/* x509/* x509ca/*
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 sun::systemctl start strongswan-swanctl
14 alice::systemctl start strongswan-swanctl
15 venus::systemctl start strongswan-swanctl
16 sun::expect-connection nat-t
17 alice::expect-connection nat-t
18 alice::swanctl --initiate --child nat-t 2> /dev/null
19 venus::expect-connection nat-t
20 venus::swanctl --initiate --child nat-t 2> /dev/null