../../guestbin/prep.sh
ipsec.conf -> PATH/etc/ipsec.conf
ipsec.secrets -> PATH/etc/ipsec.secrets
west #
 ipsec start
Redirecting to: [initsystem]
pluto(ok)
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec whack --impair suppress_retransmits
west #
 ipsec add west-east
"west-east": added oriented IKEv2 connection
west #
 echo "initdone"
initdone
west #
 ipsec route west-east
west #
 ipsec _kernel state
west #
 ipsec _kernel policy
@0 flow esp out from 192.1.2.45 to 192.1.2.23 local 0.0.0.0 peer 0.0.0.0 type acquire
west #
 echo 'TRIGGER' | nc -u -w 1 192.1.2.23 7
west #
 ../../guestbin/wait-for-pluto.sh '^".*#2: initiator established Child SA'
"west-east" #2: initiator established Child SA using #1; IPsec transport [192.1.2.45/32===192.1.2.23/32] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256 DPD=passive}
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
up
west #
 ../../guestbin/wait-for.sh --no-match 'spi 0x00000000' ipsec _kernel state
west #
 ipsec _kernel state
@0 esp transport from 192.1.2.23 to 192.1.2.45 spi 0xSPISPI enc aes-256-gcm \
	authkey 0xHASHKEY \
	enckey 0xENCKEY
	sa: spi 0xSPISPI auth gmac-aes-256 enc aes-gcm
		state mature replay 16 flags 0x400<esn>
	lifetime_cur: alloc 0 bytes 68 add N first N
	lifetime_hard: alloc 0 bytes 0 add N first 0
	lifetime_soft: alloc 0 bytes 0 add N first 0
	address_src: 192.1.2.23
	address_dst: 192.1.2.45
	key_auth: bits 288: HASHKEY
	key_encrypt: bits 288: ENCKEY
	lifetime_lastuse: alloc 0 bytes 0 add 0 first N
	counter:
		1 input packet
		0 output packets
		188 input bytes
		0 output bytes
		84 input bytes, decompressed
		0 output bytes, uncompressed
		0 packets dropped on input
		0 packets dropped on output
	replay: rpl 1
@0 esp transport from 192.1.2.45 to 192.1.2.23 spi 0xSPISPI enc aes-256-gcm \
	authkey 0xHASHKEY \
	enckey 0xENCKEY
	sa: spi 0xSPISPI auth gmac-aes-256 enc aes-gcm
		state mature replay 16 flags 0x400<esn>
	lifetime_cur: alloc 0 bytes 64 add N first N
	lifetime_hard: alloc 0 bytes 0 add N first 0
	lifetime_soft: alloc 0 bytes 0 add N first 0
	address_src: 192.1.2.45
	address_dst: 192.1.2.23
	key_auth: bits 288: HASHKEY
	key_encrypt: bits 288: ENCKEY
	lifetime_lastuse: alloc 0 bytes 0 add 0 first N
	counter:
		0 input packets
		1 output packet
		0 input bytes
		120 output bytes
		0 input bytes, decompressed
		84 output bytes, uncompressed
		0 packets dropped on input
		0 packets dropped on output
	replay: rpl 2
west #
 ipsec _kernel policy
@0 flow esp in from 192.1.2.23 to 192.1.2.45 local 192.1.2.45 peer 192.1.2.23 type require
@1 flow esp out from 192.1.2.45 to 192.1.2.23 local 192.1.2.45 peer 192.1.2.23 type require
west #
 ipsec down west-east
"west-east": initiating delete of connection's IKE SA #1 (and Child SA #2)
"west-east" #1: sent INFORMATIONAL request to delete IKE SA
"west-east" #2: ESP traffic information: in=68B out=64B
"west-east" #1: deleting IKE SA (established IKE SA)
west #
 ipsec _kernel state
west #
