/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
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
#2: "private#192.1.3.209/32"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=168, outBytes=168, maxBytes=2^63B, 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: responder established Child SA using #1; IPsec tunnel [192.1.2.23/32===192.1.3.209/32] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
east #

