/testing/guestbin/swan-prep --x509
Preparing X.509 files
west #
 certutil -D -n east -d sql:/etc/ipsec.d
west #
 cp policies/* /etc/ipsec.d/policies/
west #
 echo "192.1.2.0/24" >> /etc/ipsec.d/policies/private-or-clear
west #
 ipsec start
Redirecting to: systemctl start ipsec.service
west #
 /testing/pluto/bin/wait-until-pluto-started
west #
 # give OE policies time to load
west #
 sleep 5
west #
 echo "initdone"
initdone
west #
 ipsec whack --oppohere 192.1.2.45 --oppothere 192.1.2.23
002 initiate on demand from 192.1.2.45:0 to 192.1.2.23:0 proto=0 because: whack
1v2 "private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #1: initiate
002 "private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #2: certificate verified OK: E=user-east@testing.libreswan.org,CN=east.testing.libreswan.org,OU=Test Department,O=Libreswan,L=Toronto,ST=Ontario,C=CA
003 "private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #2: Authenticated using RSA
002 "private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 #2: negotiated connection [192.1.2.45-192.1.2.45:0-65535 0] -> [192.1.2.23-192.1.2.23:0-65535 0]
west #
 ping -n -c 4 192.1.2.23
PING 192.1.2.23 (192.1.2.23) 56(84) bytes of data.
64 bytes from 192.1.2.23: icmp_seq=1 ttl=64 time=0.XXX ms
64 bytes from 192.1.2.23: icmp_seq=2 ttl=64 time=0.XXX ms
64 bytes from 192.1.2.23: icmp_seq=3 ttl=64 time=0.XXX ms
64 bytes from 192.1.2.23: icmp_seq=4 ttl=64 time=0.XXX ms
--- 192.1.2.23 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time XXXX
rtt min/avg/max/mdev = 0.XXX/0.XXX/0.XXX/0.XXX ms
west #
 # should show traffic
west #
 ipsec whack --trafficstatus
006 #2: "private-or-clear#192.1.2.0/24"[1] ...192.1.2.23, type=ESP, add_time=1234567890, inBytes=336, outBytes=336, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
west #
 echo done
done
west #
 
