/testing/guestbin/swan-prep --hostkeys
Creating NSS database containing host keys
east #
 ipsec start
Redirecting to: [initsystem]
east #
 ../../guestbin/wait-until-pluto-started
east #
 ipsec whack --impair replay_inbound
IMPAIR: recording all inbound messages
IMPAIR: replay all inbound messages old-to-new: no -> yes
east #
 ipsec add westnet-eastnet
"westnet-eastnet": added oriented IKEv1 connection
east #
 echo "initdone"
initdone
east #
 ../../guestbin/wait-for-pluto.sh '#2: IPsec SA established'
"westnet-eastnet" #2: IPsec SA established tunnel mode {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
east #
 ipsec _kernel state
src 192.1.2.23 dst 192.1.2.45
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec
	auth-trunc hmac(sha1) 0xHASHKEY 96
	enc cbc(aes) 0xENCKEY
	lastused YYYY-MM-DD HH:MM:SS
	dir out
src 192.1.2.45 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec
	auth-trunc hmac(sha1) 0xHASHKEY 96
	enc cbc(aes) 0xENCKEY
	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 
	dir in
east #
 ipsec _kernel policy
src 192.0.1.0/24 dst 192.0.2.0/24
	dir fwd priority PRIORITY ptype main
	tmpl src 192.1.2.45 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.0.1.0/24 dst 192.0.2.0/24
	dir in priority PRIORITY ptype main
	tmpl src 192.1.2.45 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.0.2.0/24 dst 192.0.1.0/24
	dir out priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.2.45
		proto esp reqid REQID mode tunnel
east #
 sed -n -e '/IMPAIR: .*: start processing inbound replay forward/,/IMPAIR: .*: stop processing inbound replay forward/ { /^[^|]/ p }' /tmp/pluto.log
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 1
"westnet-eastnet" #1: responding to Main Mode
"westnet-eastnet" #1: sent Main Mode R1
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 1
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 1
"westnet-eastnet" #1: retransmitting in response to duplicate packet; already STATE_MAIN_R1
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 1
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 2
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 2
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 1
"westnet-eastnet" #1: discarding initial packet; already STATE_MAIN_R2
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 1
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 2
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 2
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 3
"westnet-eastnet" #1: Peer ID is FQDN: '@west'
"westnet-eastnet" #1: authenticated peer using preloaded certificate '@west' and 2nnn-bit raw RSA with SHA1 signature
"westnet-eastnet" #1: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 3
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 1
"westnet-eastnet" #1: discarding initial packet; already STATE_MAIN_R3
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 1
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 2
"westnet-eastnet" #1: packet rejected: should have been encrypted
"westnet-eastnet" #1: sending notification INVALID_FLAGS to 192.1.2.45:500
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 2
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 3
"westnet-eastnet" #1: retransmitting in response to duplicate packet; already STATE_MAIN_R3
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 3
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 4
"westnet-eastnet" #1: the peer proposed: 192.0.2.0/24===192.0.1.0/24
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 4
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 1
"westnet-eastnet" #1: discarding initial packet; already STATE_MAIN_R3
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 1
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 2
"westnet-eastnet" #1: packet rejected: should have been encrypted
"westnet-eastnet" #1: sending notification INVALID_FLAGS to 192.1.2.45:500
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 2
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 3
"westnet-eastnet" #1: retransmitting in response to duplicate packet; already STATE_MAIN_R3
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 3
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 4
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 4
IMPAIR: packet from 192.1.2.45:500: start processing inbound replay forward packet 5
"westnet-eastnet" #2: IPsec SA established tunnel mode {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
IMPAIR: packet from 192.1.2.45:500: stop processing inbound replay forward packet 5
east #
