/testing/guestbin/swan-prep --x509
Preparing X.509 files
road #
 ipsec start
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec auto --add road
"road/0x1": added IKEv2 connection
"road/0x2": added IKEv2 connection
"road/0x3": added IKEv2 connection
"road/0x4": added IKEv2 connection
road #
 echo "initdone"
initdone
road #
 # matched by peer
road #
 ipsec whack --impair revival
road #
 ipsec whack --impair suppress_retransmits
road #
 ipsec auto --up road/0x1
"road/0x1" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"road/0x1" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"road/0x1" #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/4500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"road/0x1" #1: sent IKE_AUTH request to 192.1.2.23:UDP/4500
"road/0x1" #1: initiator established IKE SA; authenticated peer certificate 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org' and 3nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
"road/0x1" #2: initiator established Child SA using #1; IPsec tunnel [192.0.3.0/24===192.0.2.0/24] {ESPinUDP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE NATD=192.1.2.23:4500 DPD=passive}
road #
 ipsec whack --impair none
road #
 # not matched by peer, should fail
road #
 ipsec whack --impair revival
road #
 ipsec auto --up road/0x2
"road/0x2" #3: initiating Child SA using IKE SA #1
"road/0x2" #3: sent CREATE_CHILD_SA request to create Child SA using IKE SA #1
"road/0x2" #3: CREATE_CHILD_SA failed with error notification TS_UNACCEPTABLE
"road/0x2" #3: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds
"road/0x2" #3: IMPAIR: revival: skip scheduling revival event
road #
 ipsec whack --impair none
road #
 # matched by peer
road #
 ipsec whack --impair revival
road #
 ipsec whack --impair suppress_retransmits
road #
 ipsec auto --up road/0x3
"road/0x3" #4: initiating Child SA using IKE SA #1
"road/0x3" #4: sent CREATE_CHILD_SA request to create Child SA using IKE SA #1
"road/0x3" #4: initiator established Child SA using #1; IPsec tunnel [192.0.3.0/24===192.0.20.0/24] {ESPinUDP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE-DH19 NATD=192.1.2.23:4500 DPD=passive}
road #
 ipsec whack --impair none
road #
 # not matched by peer, should fail
road #
 ipsec whack --impair revival
road #
 ipsec auto --up road/0x4
"road/0x4" #5: initiating Child SA using IKE SA #1
"road/0x4" #5: sent CREATE_CHILD_SA request to create Child SA using IKE SA #1
"road/0x4" #5: CREATE_CHILD_SA failed with error notification TS_UNACCEPTABLE
"road/0x4" #5: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds
"road/0x4" #5: IMPAIR: revival: skip scheduling revival event
road #
 ipsec whack --impair none
road #
 # There should be 2 tunnels up, and 2 broken tunnels
road #
 ipsec trafficstatus
#2: "road/0x1", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
#4: "road/0x3", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
road #
 ipsec showstates
#1: "road/0x1":4500 ESTABLISHED_IKE_SA (established IKE SA); NAT_KEEPALIVE in XXs; REKEY in XXs; REPLACE in XXs; newest; idle;
#2: "road/0x1":4500 ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; REPLACE in XXs; newest; eroute owner; IKE SA #1; idle;
#2: "road/0x1" esp.ESPSPIi@192.1.2.23 esp.ESPSPIi@192.1.3.209 tun.0@192.1.2.23 tun.0@192.1.3.209 Traffic: ESPin=0B ESPout=0B ESPmax=2^63B 
#4: "road/0x3":4500 ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; REPLACE in XXs; newest; eroute owner; IKE SA #1; idle;
#4: "road/0x3" esp.ESPSPIi@192.1.2.23 esp.ESPSPIi@192.1.3.209 tun.0@192.1.2.23 tun.0@192.1.3.209 Traffic: ESPin=0B ESPout=0B ESPmax=2^63B 
road #
 echo done
done
road #
 ipsec trafficstatus
#2: "road/0x1", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
#4: "road/0x3", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
road #
 ../../guestbin/ipsec-kernel-state.sh
src 192.1.3.209 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 0, bitmap-length 0
src 192.1.2.23 dst 192.1.3.209
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
src 192.1.3.209 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 0, bitmap-length 0
src 192.1.2.23 dst 192.1.3.209
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
road #
 ../../guestbin/ipsec-kernel-policy.sh
src 192.0.2.0/24 dst 192.0.3.0/24
	dir fwd priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
src 192.0.2.0/24 dst 192.0.3.0/24
	dir in priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
src 192.0.3.0/24 dst 192.0.2.0/24
	dir out priority PRIORITY ptype main
	tmpl src 192.1.3.209 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.0.3.0/24 dst 192.0.20.0/24
	dir out priority PRIORITY ptype main
	tmpl src 192.1.3.209 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.0.20.0/24 dst 192.0.3.0/24
	dir fwd priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
src 192.0.20.0/24 dst 192.0.3.0/24
	dir in priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
road #
 
