/testing/guestbin/swan-prep
west #
 # make sure that clear text does not get through
west #
 iptables -A INPUT -i eth1 -s 192.0.2.0/24 -j DROP
west #
 iptables -I INPUT -m policy --dir in --pol ipsec -j ACCEPT
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add west
002 "west": added IKEv2 connection
west #
 echo "initdone"
initdone
west #
 # IKE #1 CHILD #2
west #
 ipsec auto --up west
1v2 "west" #1: initiating IKEv2 connection
1v2 "west" #1: sent IKE_SA_INIT request
1v2 "west" #1: sent IKE_AUTH request {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=MODP2048}
003 "west" #1: established IKE SA; authenticated using authby=secret and peer ID_FQDN '@east'
004 "west" #2: established Child SA; IPsec tunnel [192.0.1.0-192.0.1.255:0-65535 0] -> [192.0.2.0-192.0.2.255:0-65535 0] {ESP=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE NATOA=none NATD=none DPD=passive}
west #
 ../../guestbin/ping-once.sh --up -I 192.0.1.254 192.0.2.254
up
west #
 ipsec whack --trafficstatus
006 #2: "west", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, id='@east'
west #
 # why?
west #
 sleep 13
west #
 # IKE #3 CHILD #2
west #
 ipsec whack --rekey-ike --name west
002 "west" #3: initiating rekey to replace IKE SA #1
1v2 "west" #3: sent CREATE_CHILD_SA request to rekey IKE SA
002 "west" #3: rekeyed #1 STATE_V2_REKEY_IKE_I1 and expire it remaining life XXs
004 "west" #3: established IKE SA {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=MODP2048}
002 "west" #1: deleting state (STATE_V2_ESTABLISHED_IKE_SA) and sending notification
west #
 ../../guestbin/ping-once.sh --up -I 192.0.1.254 192.0.2.254
up
west #
 ipsec whack --trafficstatus
006 #2: "west", type=ESP, add_time=1234567890, inBytes=168, outBytes=168, id='@east'
west #
 ipsec status |grep STATE_
000 #2: "west":500 STATE_V2_ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; newest IPSEC; eroute owner; isakmp#3; idle;
000 #3: "west":500 STATE_V2_ESTABLISHED_IKE_SA (established IKE SA); REKEY in XXs; newest ISAKMP; idle;
west #
 # why?
west #
 sleep 21
west #
 # IKE #4 CHILD #2
west #
 ipsec whack --rekey-ike --name west
002 "west" #4: initiating rekey to replace IKE SA #3
1v2 "west" #4: sent CREATE_CHILD_SA request to rekey IKE SA
002 "west" #4: rekeyed #3 STATE_V2_REKEY_IKE_I1 and expire it remaining life XXs
004 "west" #4: established IKE SA {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=MODP2048}
002 "west" #3: deleting state (STATE_V2_ESTABLISHED_IKE_SA) and sending notification
west #
 ../../guestbin/ping-once.sh --up -I 192.0.1.254 192.0.2.254
up
west #
 ipsec status |grep STATE_
000 #2: "west":500 STATE_V2_ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; newest IPSEC; eroute owner; isakmp#4; idle;
000 #4: "west":500 STATE_V2_ESTABLISHED_IKE_SA (established IKE SA); REKEY in XXs; newest ISAKMP; idle;
west #
 ipsec whack --trafficstatus
006 #2: "west", type=ESP, add_time=1234567890, inBytes=252, outBytes=252, id='@east'
west #
 ipsec status |grep STATE_
000 #2: "west":500 STATE_V2_ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; newest IPSEC; eroute owner; isakmp#4; idle;
000 #4: "west":500 STATE_V2_ESTABLISHED_IKE_SA (established IKE SA); REKEY in XXs; newest ISAKMP; idle;
west #
 
