/testing/guestbin/swan-prep --hostkeys
Creating NSS database containing host keys
road #
 ipsec start
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec auto --add road-east-vti
"road-east-vti": added IKEv1 connection
road #
 echo "initdone"
initdone
road #
 ../../guestbin/ip.sh address add 192.0.3.254/24 dev eth0
road #
 ipsec auto --up road-east-vti
"road-east-vti" #1: initiating IKEv1 Main Mode connection
"road-east-vti" #1: sent Main Mode request
"road-east-vti" #1: sent Main Mode I2
"road-east-vti" #1: sent Main Mode I3
"road-east-vti" #1: Peer ID is FQDN: '@east'
"road-east-vti" #1: authenticated peer using preloaded certificate '@east' and 2nnn-bit RSA with SHA1 signature
"road-east-vti" #1: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"road-east-vti" #2: initiating Quick Mode IKEv1+RSASIG+ENCRYPT+TUNNEL+PFS+UP+IKE_FRAG_ALLOW+ESN_NO+ESN_YES {using isakmp#1 msgid:MSGID proposal=AES_CBC-HMAC_SHA1_96, AES_CBC-HMAC_SHA2_512_256, AES_CBC-HMAC_SHA2_256_128, AES_GCM_16_128-NONE, AES_GCM_16_256-NONE, 3DES_CBC-HMAC_SHA1_96, 3DES_CBC-HMAC_SHA2_512_256, 3DES_CBC-HMAC_SHA2_256_128 pfsgroup=MODP2048 192.0.3.0/24===192.0.2.0/24}
"road-east-vti" #2: sent Quick Mode request
"road-east-vti" #2: prepare-client output: net.ipv4.conf.vti0.disable_policy = 1
"road-east-vti" #2: prepare-client output: net.ipv4.conf.vti0.rp_filter = 0
"road-east-vti" #2: prepare-client output: net.ipv4.conf.vti0.forwarding = 1
"road-east-vti" #2: up-client output: vti interface "vti0" already exists with conflicting setting (perhaps need vti-shared=yes ?
"road-east-vti" #2: IPsec SA established tunnel mode {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
road #
 # since we have vti-routing=no, no marking, so unencrypted packets are dropped
road #
 ../../guestbin/ping-once.sh --down -I 192.0.3.254 192.0.2.254
down
road #
 ipsec whack --trafficstatus
#2: "road-east-vti", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='@east'
road #
 ip ro add 192.0.2.254/32 dev vti0
road #
 # now packets into vti0 device will get marked, and encrypted and counted
road #
 ../../guestbin/ping-once.sh --up -I 192.0.3.254 192.0.2.254
up
road #
 ipsec whack --trafficstatus
#2: "road-east-vti", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
road #
 echo done
done
road #
 # 4 dropped packets should be visible on east because road leaked them
road #
 hostname | grep nic > /dev/null || ipsec whack --trafficstatus
#2: "road-east-vti", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
road #
 grep -v -P "\t0$" /proc/net/xfrm_stat
road #
