/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
"west": added IKEv2 connection
west #
 echo "initdone"
initdone
west #
 # bring up west and confirm
west #
 ipsec auto --up west
"west" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"west" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"west" #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_CBC_256 integ=HMAC_SHA1_96 prf=HMAC_SHA1 group=MODP8192}, initiating IKE_AUTH
"west" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500; Child SA #2 {ESP <0xESPESP}
"west" #1: initiator established IKE SA; authenticated peer using authby=secret and FQDN '@east'
"west" #2: initiator established Child SA using #1; IPsec tunnel [192.0.1.0/24===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
west #
 ../../guestbin/ping-once.sh --up -I 192.0.1.254 192.0.2.254
up
west #
 # expect IKE #1 CHILD #2
west #
 ipsec whack --trafficstatus
#2: "west", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
west #
 # why?
west #
 echo "sleep 9"
sleep 9
west #
 sleep 9
west #
 # rekey CHILD SA
west #
 ipsec whack --rekey-child --name west
"west" #3: initiating rekey to replace Child SA #2
"west" #3: sent CREATE_CHILD_SA request to rekey Child SA #2 using IKE SA #1 {ESP <0xESPESP}
... should fail due to invalid ke ...
