/testing/guestbin/swan-prep
north #
 # confirm that the network is alive
north #
 ../../pluto/bin/wait-until-alive 192.1.2.23
destination 192.1.2.23 is alive
north #
 ipsec start
Redirecting to: systemctl start ipsec.service
north #
 /testing/pluto/bin/wait-until-pluto-started
north #
 ipsec auto --add north-east-port3
002 added connection description "north-east-port3"
north #
 echo done
done
north #
 ipsec auto --up  north-east-port3
002 "north-east-port3" #1: initiating Main Mode
1v1 "north-east-port3" #1: STATE_MAIN_I1: initiate
1v1 "north-east-port3" #1: STATE_MAIN_I2: sent MI2, expecting MR2
1v1 "north-east-port3" #1: STATE_MAIN_I3: sent MI3, expecting MR3
002 "north-east-port3" #1: Peer ID is ID_FQDN: '@east'
003 "north-east-port3" #1: Authenticated using RSA
004 "north-east-port3" #1: STATE_MAIN_I4: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
002 "north-east-port3" #2: initiating Quick Mode RSASIG+ENCRYPT+PFS+UP+IKEV1_ALLOW+SAREF_TRACK+IKE_FRAG_ALLOW+ESN_NO
1v1 "north-east-port3" #2: STATE_QUICK_I1: initiate
004 "north-east-port3" #2: STATE_QUICK_I2: sent QI2, IPsec SA established transport mode {ESP/NAT=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 NATOA=none NATD=192.1.2.23:4500 DPD=passive}
north #
 # port 2 does NOT go over ipsec, traffic should remain 0
north #
 echo test | nc 192.1.2.23 2
north #
 ipsec whack --trafficstatus
006 #2: "north-east-port3", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, id='@east'
north #
 # port 3 goes over ipsec, traffic counters should be non-zero
north #
 echo test | nc 192.1.2.23 3
north #
 ipsec whack --trafficstatus
006 #2: "north-east-port3", type=ESP, add_time=1234567890, inBytes=104, outBytes=173, id='@east'
north #
 echo done
done
north #
north #
 ../bin/check-for-core.sh
north #
 if [ -f /sbin/ausearch ]; then ausearch -r -m avc -ts recent ; fi

