/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
east #
 cp policies/* /etc/ipsec.d/policies/
east #
 echo "192.1.3.0/24"  >> /etc/ipsec.d/policies/private-or-clear
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 10,' -- ipsec auto --status
Total IPsec connections: loaded 10, routed 5, active 0
east #
 echo "initdone"
initdone
east #
 # A tunnel should have established
east #
 grep "^[^|].* established Child SA" /tmp/pluto.log
"private-or-clear#192.1.3.0/24"[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 #
 # check for proper state counting
east #
 hostname | grep east && ipsec status | grep "SAs: total"
east
IKE SAs: total(1), half-open(0), open(0), authenticated(0), anonymous(1)
IPsec SAs: total(1), authenticated(0), anonymous(1)
east #
 sleep 10
east #
 ipsec auto --delete private-or-clear
"private-or-clear": deleting group instances
"private-or-clear#192.1.3.0/24": deleting template instances
"private-or-clear#192.1.3.0/24"[1] ...192.1.3.209: terminating SAs using this connection
"private-or-clear#192.1.3.0/24"[1] ...192.1.3.209 #1: deleting IKE SA (ESTABLISHED_IKE_SA) and sending notification
"private-or-clear#192.1.3.0/24"[1] ...192.1.3.209 #2: ESP traffic information: in=84B out=84B
east #
 sleep 5
east #
 # should show 0 states left
east #
 ipsec status | grep "SAs: total"
IKE SAs: total(0), half-open(0), open(0), authenticated(0), anonymous(0)
IPsec SAs: total(0), authenticated(0), anonymous(0)
east #
