/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 #
 ../../guestbin/wait-until-pluto-started
east #
 # give OE policies time to load
east #
 ../../guestbin/wait-for.sh --match 'loaded 7' -- ipsec auto --status
000 Total IPsec connections: loaded 7, active 0
east #
 iptables -D INPUT -p UDP --dport 500 -j DROP
east #
 # trigger OE
east #
 ../../guestbin/ping-once.sh --forget 192.1.3.209
fired and forgotten
east #
 ping -n -q -c 2 192.1.3.209
PING 192.1.3.209 (192.1.3.209) 56(84) bytes of data.
--- 192.1.3.209 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time XXXX
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 "^[^|].*: established Child SA" /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]

