/testing/guestbin/swan-prep --hostkeys
Creating NSS database containing host keys
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 # left as example/test for manually calling whack
west #
 ipsec whack --label 'SAwest-east leftrsasigkey'  --keyid "@west" --pubkeyrsa "0sAQOm9dY/449sAWr8e3xtV4tJOQ1396zihfGYHkttpT6zlprRmVq8EPKX3vIo+V+SCfDI1BLkYG6cYJgQAX0mt4+VYi2H3c3e9tOPNbBQ0Bj1mfgE8f9hW7x/H8AE2OSMrDStesHaPC2MMK7WPFmxOpTT1Spzkb1ZXz5yv0obncWyK03nDSQ+d/l/LdadKe9wfXptorhhDEsJSgZxhHCFmo9SoYAG/cb8Pif6Fvoyg6nKgNsPSr/36VWOvSlNI6bcKrNdYqkhHr6D2Gk8AwpIjtM6EfKGWtEwZb3I9IOH/wSHMwVP4NiM/rMZTN2FQPNNbuhJFAYsH1lZBY8gsMpGP8kgfgQwfZqAbD8KiffTr9gVBDf5"
west #
 ipsec whack --label 'SAwest-east rightrsasigkey'  --keyid "@east" --pubkeyrsa "0sAQO9bJbr33iJs+13DaF/e+UWwsnkfZIKkJ1VQ7RiEwOFeuAme1QfygmTz/8lyQJMeMqU5T6s0fmo5bt/zCCE4CHJ8A3FRLrzSGRhWPYPYw3SZx5Zi+zzUDlx+znaEWS2Ys1f040uwVDtnG4iDDmnzmK1r4qADy5MBVyCx40pAi67I1/b8p61feIgcBpj845drEfwXCZOsdBCYFJKsHclzuCYK0P0x1kaZAGD6k7jGiqSuFWrY91LcEcp3Om0YL9DTViPZHOVcKw1ibLCnNRiwF9WX60b5d1Jk2r1I4Lt1OfV8VXyLaImpjZTL5T7mSJcR8xtgDCIljgM9fLtN9AJ1QePae+pmc5NGneeOcQ488VRUUjv"
west #
 ipsec whack --name SAwest-east --ikev1 --encrypt --tunnel --pfs --rsasig --host "192.1.2.45"  --nexthop "192.1.2.23" --updown "ipsec _updown" --id "@west" --to --host "192.1.2.23"  --nexthop "192.1.2.45" --updown "ipsec _updown" --id "@east" --ipseclifetime "28800" --no-esn
"SAwest-east": added IKEv1 connection
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 SAwest-east
"SAwest-east" #1: initiating IKEv1 Main Mode connection
"SAwest-east" #1: sent Main Mode request
"SAwest-east" #1: sent Main Mode I2
"SAwest-east" #1: sent Main Mode I3
"SAwest-east" #1: Peer ID is ID_FQDN: '@east'
"SAwest-east" #1: authenticated peer using preloaded certificate '@east' and 2nnn-bit RSA with SHA1 signature
"SAwest-east" #1: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"SAwest-east" #2: initiating Quick Mode IKEv1+RSASIG+ENCRYPT+TUNNEL+PFS+UP+IKE_FRAG_ALLOW+ESN_NO
"SAwest-east" #2: sent Quick Mode request
"SAwest-east" #2: IPsec SA established tunnel mode {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
west #
 # use the tunnel
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
up
west #
 # show the tunnel!
west #
 ipsec whack --trafficstatus
#2: "SAwest-east", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
west #
 # "Time to shut down my computer!"...
west #
 ipsec whack --shutdown
Pluto is shutting down
west #
 # ...but unless the delete SA is acknowledged, this ping will fail,
west #
 # as our peer still routed us
west #
 sleep 5
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
up
west #
 echo done
done
west #
 ../../guestbin/ipsec-kernel-state.sh
west #
 ../../guestbin/ipsec-kernel-policy.sh
west #
 # up to 3.26 we printed a bogus message, this is checking that no longer happens
west #
 grep "received and ignored empty informational" /tmp/pluto.log
west #
 
