/testing/guestbin/swan-prep  --x509
Preparing X.509 files
east #
 certutil -D -n road -d sql:/etc/ipsec.d
east #
 cp east-ikev2-oe.conf /etc/ipsec.d/ikev2-oe.conf
east #
 cp policies/* /etc/ipsec.d/policies/
east #
 echo "192.1.3.0/24"  >> /etc/ipsec.d/policies/private-or-clear
east #
 # don't start ipsec yet
east #
 echo "initdone"
initdone
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 11,' -- ipsec auto --status
000 Total IPsec connections: loaded 11, active 0
east #
 # trigger OE; traffic minus first packet should have flown through tunnel
east #
 ../../guestbin/ping-once.sh --forget -I 192.1.2.23 192.1.3.209
fired and forgotten
east #
 ../../guestbin/wait-for.sh --match private-or-clear -- ipsec trafficstatus
006 #2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=0, outBytes=0, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=road.testing.libreswan.org, E=user-road@testing.libreswan.org'
east #
 ../../guestbin/ping-once.sh --up -I 192.1.2.23 192.1.3.209
up
east #
 ../../guestbin/ping-once.sh --up -I 192.1.2.23 192.1.3.209
up
east #
 ../../guestbin/ping-once.sh --up -I 192.1.2.23 192.1.3.209
up
east #
 ipsec trafficstatus
006 #2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=252, outBytes=252, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=road.testing.libreswan.org, E=user-road@testing.libreswan.org'
east #
 # OE has been triggered.
east #
 # there should be no %pass shunts on either side and an active tunnel and no partial states
east #
 ipsec status |grep STATE_
000 #1: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209:500 STATE_V2_ESTABLISHED_IKE_SA (established IKE SA); REKEY in XXs; newest ISAKMP; idle;
000 #2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209:500 STATE_V2_ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; newest IPSEC; eroute owner; isakmp#1; idle;
east #
 ipsec trafficstatus
006 #2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=252, outBytes=252, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=road.testing.libreswan.org, E=user-road@testing.libreswan.org'
east #
 ipsec shuntstatus
000 Bare Shunt list:
000  
east #
 ../../guestbin/ipsec-look.sh
east NOW
XFRM state:
src 192.1.3.209 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 32 flag af-unspec
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
src 192.1.2.23 dst 192.1.3.209
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 32 flag af-unspec
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
src 192.1.2.23 dst 192.1.3.209
	proto esp spi 0x00000000 reqid REQID mode transport
	replay-window 0 
	sel src 192.1.2.23/32 dst 192.1.3.209/32 proto icmp type 8 code 0 dev eth1 
XFRM policy:
src 192.1.2.23/32 dst 192.1.2.253/32
	dir out priority 3129279 ptype main
src 192.1.2.23/32 dst 192.1.2.254/32
	dir out priority 3129279 ptype main
src 192.1.2.23/32 dst 192.1.3.209/32
	dir out priority 3129279 ptype main
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
src 192.1.2.23/32 dst 192.1.3.253/32
	dir out priority 3129279 ptype main
src 192.1.2.23/32 dst 192.1.3.254/32
	dir out priority 3129279 ptype main
src 192.1.2.253/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
src 192.1.2.253/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
src 192.1.2.254/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
src 192.1.2.254/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
src 192.1.3.209/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
	tmpl src 192.1.3.209 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.1.3.209/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
	tmpl src 192.1.3.209 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.1.3.253/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
src 192.1.3.253/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
src 192.1.3.254/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
src 192.1.3.254/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
src 192.1.2.23/32 dst 192.1.3.0/24
	dir out priority 3129294 ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid REQID mode transport
XFRM done
IPSEC mangle TABLES
NEW_IPSEC_CONN mangle TABLES
ROUTING TABLES
default via 192.1.2.254 dev eth1
192.0.1.0/24 via 192.1.2.45 dev eth1
192.0.2.0/24 dev eth0 proto kernel scope link src 192.0.2.254
192.1.2.0/24 dev eth1 proto kernel scope link src 192.1.2.23
NSS_CERTIFICATES
Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI
Libreswan test CA for mainca - Libreswan                     CT,, 
east                                                         u,u,u
hashsha1                                                     P,,  
nic                                                          P,,  
north                                                        P,,  
west                                                         P,,  
west-ec                                                      P,,  
east #
 
