/testing/guestbin/swan-prep --x509
Preparing X.509 files
east #
 cp policies/* /etc/ipsec.d/policies/
east #
 echo "192.1.3.209/32"  >> /etc/ipsec.d/policies/private
east #
 # do not start yet
east #
 echo "initdone"
initdone
east #
 # now start and trigger OE to road
east #
 iptables -I INPUT -p UDP --dport 500 -j DROP
east #
 ipsec start
Redirecting to: [initsystem]
east #
 /testing/pluto/bin/wait-until-pluto-started
east #
 # give OE policies time to load
east #
 sleep 5
east #
 iptables -D INPUT -p UDP --dport 500 -j DROP
east #
 # trigger OE
east #
 ping -n -c3 192.1.3.209
PING 192.1.3.209 (192.1.3.209) 56(84) bytes of data.
64 bytes from 192.1.3.209: icmp_seq=2 ttl=64 time=0.XXX ms
64 bytes from 192.1.3.209: icmp_seq=3 ttl=64 time=0.XXX ms
--- 192.1.3.209 ping statistics ---
3 packets transmitted, 2 received, 33.3333% packet loss, time 53ms
rtt min/avg/max/mdev = 0.XXX/0.XXX/0.XXX/0.XXX ms
east #
 sleep 3
east #
 ipsec trafficstatus
006 #2: "private#192.1.3.209/32"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=168, outBytes=168, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=road.testing.libreswan.org, E=user-road@testing.libreswan.org'
east #
 # a tunnel should have established
east #
 grep "negotiated connection" /tmp/pluto.log
"private#192.1.3.209/32"[1] ...192.1.3.209 #2: negotiated connection [192.1.2.23-192.1.2.23:0-65535 0] -> [192.1.3.209-192.1.3.209:0-65535 0]
east #
 ../bin/check-for-core.sh
east #
 if [ -f /sbin/ausearch ]; then ausearch -r -m avc -ts recent ; fi

