/testing/guestbin/swan-prep
north #
 # confirm that the network is alive
north #
 ../../guestbin/wait-until-alive 192.1.2.23
destination 192.1.2.23 is alive
north #
 ipsec start
Redirecting to: [initsystem]
north #
 ../../guestbin/wait-until-pluto-started
north #
 ipsec auto --add north-east-7
002 "north-east-7": added IKEv1 connection
north #
 echo done
done
north #
 ipsec auto --up north-east-7
002 "north-east-7" #1: initiating IKEv1 Main Mode connection
1v1 "north-east-7" #1: sent Main Mode request
1v1 "north-east-7" #1: sent Main Mode I2
1v1 "north-east-7" #1: sent Main Mode I3
002 "north-east-7" #1: Peer ID is ID_FQDN: '@east'
003 "north-east-7" #1: authenticated peer '2nnn-bit RSA with SHA1' signature using preloaded certificate '@east'
004 "north-east-7" #1: IKE SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
002 "north-east-7" #2: initiating Quick Mode IKEv1+RSASIG+ENCRYPT+PFS+UP+IKE_FRAG_ALLOW+ESN_NO+ESN_YES
1v1 "north-east-7" #2: sent Quick Mode request
004 "north-east-7" #2: IPsec SA established transport mode {ESPinUDP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 NATD=192.1.2.23:4500 DPD=passive}
north #
 # port 2 does NOT go over ipsec, IPsec traffic should remain 0
north #
 echo test | nc 192.1.2.23 2
Ncat: Connection refused.
north #
 ipsec trafficstatus
006 #2: "north-east-7", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='@east'
north #
 # port 7 goes over ipsec, traffic counters should be non-zero
north #
 echo test | nc 192.1.2.23 7
Ncat: Connection refused.
north #
 ipsec trafficstatus
006 #2: "north-east-7", type=ESP, add_time=1234567890, inBytes=20, outBytes=40, maxBytes=2^63B, id='@east'
north #
 echo done
done
north #
 
