/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add west-east
"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
"west-east" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"west-east" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"west-east" #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"west-east" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"west-east" #1: initiator established IKE SA; authenticated peer using preloaded certificate '@east' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature
"west-east" #2: initiator established Child SA using #1; IPsec tunnel [192.1.2.45/32===192.1.2.23/32] {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
#2: "west-east", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
west #
 # Wait more then 15 seconds while ensuring there is traffic
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 # force a rekey
west #
 ipsec auto --up west-east
"west-east" #3: initiating Child SA using IKE SA #1
"west-east" #3: sent CREATE_CHILD_SA request to create Child SA using IKE SA #1
"west-east" #3: initiator established Child SA using #1; IPsec tunnel [192.1.2.45/32===192.1.2.23/32] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE-DH19 DPD=active}
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23 >/dev/null
west #
 sleep 1
west #
 ../../guestbin/ping-once.sh --up 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 #
 
