/testing/guestbin/swan-prep --hostkeys
Creating NSS database containing host keys
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add ikev2-west-east
"ikev2-west-east": added IKEv2 connection
west #
 echo "initdone"
initdone
west #
 ipsec auto --up ikev2-west-east
"ikev2-west-east" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"ikev2-west-east" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"ikev2-west-east" #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
"ikev2-west-east" #1: sent IKE_AUTH request to 192.1.2.23:UDP/4500
"ikev2-west-east" #1: initiator established IKE SA; authenticated peer using preloaded certificate '@east' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature
"ikev2-west-east" #2: initiator established Child SA using #1; IPsec transport [192.1.2.45/32===192.1.2.23/32] {ESPinUDP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE NATD=192.1.2.23:4500 DPD=passive}
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
up
west #
 ipsec whack --trafficstatus
#2: "ikev2-west-east", type=ESP, add_time=1234567890, inBytes=64, outBytes=64, maxBytes=2^63B, id='@east'
west #
 # should show tcp being used
west #
 ../../guestbin/ipsec-kernel-state.sh
src 192.1.2.45 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode transport
	replay-window 0 flag esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 0, bitmap-length 0
	sel src 192.1.2.45/32 dst 192.1.2.23/32 
src 192.1.2.23 dst 192.1.2.45
	proto esp spi 0xSPISPI reqid REQID mode transport
	replay-window 0 flag esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
	sel src 192.1.2.23/32 dst 192.1.2.45/32 
west #
 ../../guestbin/ipsec-kernel-policy.sh 2>/dev/null | grep encap
west #
 ../../guestbin/ipsec-kernel-state.sh
src 192.1.2.45 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode transport
	replay-window 0 flag esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 0, bitmap-length 0
	sel src 192.1.2.45/32 dst 192.1.2.23/32 
src 192.1.2.23 dst 192.1.2.45
	proto esp spi 0xSPISPI reqid REQID mode transport
	replay-window 0 flag esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
	sel src 192.1.2.23/32 dst 192.1.2.45/32 
west #
 ../../guestbin/ipsec-kernel-policy.sh
src 192.1.2.23/32 dst 192.1.2.45/32
	dir in priority PRIORITY ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid REQID mode transport
src 192.1.2.45/32 dst 192.1.2.23/32
	dir out priority PRIORITY ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid REQID mode transport
west #
 ipsec auto --down ikev2-west-east
"ikev2-west-east": initiating delete of connection's IKE SA #1 (and Child SA #2)
"ikev2-west-east" #1: sent INFORMATIONAL request to delete IKE SA
"ikev2-west-east" #2: ESP traffic information: in=64B out=64B
"ikev2-west-east" #1: deleting IKE SA (established IKE SA)
west #
 echo "done"
done
west #
 ipsec whack --shutdown
Pluto is shutting down
west #
 
