/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add west-east
002 "west-east": added IKEv2 connection
west #
 ipsec whack --impair suppress-retransmits
west #
 echo "initdone"
initdone
west #
 #!/bin/sh
west #
 # we can transmit in the clear
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
up
west #
 # bring up the tunnel
west #
 ipsec auto --up west-east
1v2 "west-east" #1: initiating IKEv2 connection
1v2 "west-east" #1: sent IKE_SA_INIT request
1v2 "west-east" #1: sent IKE_AUTH request {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=MODP2048}
003 "west-east" #1: established IKE SA; authenticated using RSA with SHA2_512 and preloaded certificate '@east'
004 "west-east" #2: established Child SA using #1; IPsec tunnel [192.1.2.45-192.1.2.45:0-65535 0] -> [192.1.2.23-192.1.2.23:0-65535 0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=active}
west #
 # use the tunnel
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
up
west #
 # show the tunnel!
west #
 echo "Tunnel should be up"
Tunnel should be up
west #
 ipsec whack --trafficstatus
006 #2: "west-east", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, id='@east'
west #
 # Wait more then 15 seconds while ensuring there is traffic
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 # force a rekey
west #
 ipsec auto --up west-east
002 "west-east" #3: initiating Child SA using IKE SA #1
1v2 "west-east" #3: sent CREATE_CHILD_SA request for new IPsec SA
004 "west-east" #3: established Child SA using #1; IPsec tunnel [192.1.2.45-192.1.2.45:0-65535 0] -> [192.1.2.23-192.1.2.23:0-65535 0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE-MODP2048 DPD=active}
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ping -n -q -c 1 192.1.2.23 >/dev/null
west #
 echo done
done
west #
 # Confirm expired IPsec SA will not trigger a liveness probe
west #
 grep "liveness: .* was replaced by "  /tmp/pluto.log
| liveness: #2 was replaced by #3 so not needed
west #
 
