/testing/guestbin/swan-prep --hostkeys
Creating NSS database containing host keys
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add west-east
ipsec addconn: /etc/ipsec.conf:17: warning: obsolete keyword ignored: dpdaction=restart
"west-east": added IKEv1 connection
west #
 echo "initdone"
initdone
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: multiple DH groups in aggressive mode can cause interop failure
"west-east" #1: Deleting previous proposal in the hopes of selecting DH 2 or DH 5
"west-east" #1: transform (OAKLEY_AES_CBC,OAKLEY_SHA1,DH19 keylen 0) ignored.
"west-east" #1: transform (OAKLEY_AES_CBC,OAKLEY_SHA1,DH31 keylen 0) ignored.
"west-east" #1: initiating IKEv1 Aggressive Mode connection
"west-east" #1: multiple DH groups in aggressive mode can cause interop failure
"west-east" #1: Deleting previous proposal in the hopes of selecting DH 2 or DH 5
"west-east" #1: transform (OAKLEY_AES_CBC,OAKLEY_SHA1,DH19 keylen 0) ignored.
"west-east" #1: transform (OAKLEY_AES_CBC,OAKLEY_SHA1,DH31 keylen 0) ignored.
"west-east" #1: sent Aggressive Mode request
"west-east" #1: Peer ID is ID_FQDN: '@east'
"west-east" #1: authenticated peer using preloaded certificate '@east' and 2nnn-bit RSA with SHA1 signature
"west-east" #1: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA1 group=MODP1536}
"west-east" #2: initiating Quick Mode IKEv1+RSASIG+ENCRYPT+TUNNEL+PFS+UP+AGGRESSIVE+IKE_FRAG_ALLOW+ESN_NO+ESN_YES
"west-east" #2: sent Quick Mode request
"west-east" #2: IPsec SA established tunnel mode {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 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 #
 # Let R_U_THERE packets flow
west #
 echo "Waiting 15 seconds..."
Waiting 15 seconds...
west #
 sleep 15
west #
 echo "Setting up block via iptables"
Setting up block via iptables
west #
 iptables -I INPUT -s 192.1.2.23/32 -d 0/0 -j DROP
west #
 iptables -I OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROP
west #
 # DPD should have triggered now
west #
 echo "Tunnel should be down"
Tunnel should be down
west #
 ipsec whack --trafficstatus
west #
 # Remove the Blockage
west #
 echo "Removing block"
Removing block
west #
 iptables -D INPUT -s 192.1.2.23/32 -d 0/0 -j DROP
west #
 iptables -D OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROP
west #
 sleep 20
west #
 sleep 20
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
up
west #
 # Tunnel should be back up now
west #
 echo "Tunnel should be up"
Tunnel should be up
west #
 ipsec whack --trafficstatus
#4: "west-east", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
west #
 echo done
done
west #
 # no tunnels left, Ma!
west #
 
