/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 ../../guestbin/ip.sh address add 192.0.100.254/24 dev eth0:1
west #
 ../../guestbin/ip.sh route add 192.0.200.0/24 via 192.1.2.23  dev eth1
west #
 # ensure that clear text does not get through
west #
 iptables -A INPUT -i eth1 -s 192.0.2.0/24 -j DROP
west #
 iptables -A INPUT -i eth1 -s 192.0.200.0/24 -j DROP
west #
 iptables -I INPUT -m policy --dir in --pol ipsec -j ACCEPT
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec whack --impair suppress_retransmits
west #
 ipsec auto --add westnet-eastnet-ikev2a
"westnet-eastnet-ikev2a": added IKEv2 connection
west #
 ipsec auto --add westnet-eastnet-ikev2b
"westnet-eastnet-ikev2b": added IKEv2 connection
west #
 ipsec auto --add westnet-eastnet-ikev2c
"westnet-eastnet-ikev2c": added IKEv2 connection
west #
 ipsec whack --impair suppress_retransmits
west #
 echo "initdone"
initdone
west #
 ipsec auto --up westnet-eastnet-ikev2a
"westnet-eastnet-ikev2a" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"westnet-eastnet-ikev2a" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"westnet-eastnet-ikev2a" #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=3DES_CBC_192 integ=HMAC_MD5_96 prf=HMAC_MD5 group=MODP2048}, initiating IKE_AUTH
"westnet-eastnet-ikev2a" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"westnet-eastnet-ikev2a" #1: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
"westnet-eastnet-ikev2a" #2: initiator established Child SA using #1; IPsec tunnel [192.0.1.0/24===192.0.2.0/24] {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA2_512_256 DPD=passive}
west #
 ../../guestbin/ping-once.sh --up -I 192.0.1.254 192.0.2.254
up
west #
 ipsec auto --up westnet-eastnet-ikev2b
"westnet-eastnet-ikev2b" #3: initiating Child SA using IKE SA #1
"westnet-eastnet-ikev2b" #3: sent CREATE_CHILD_SA request to create Child SA using IKE SA #1
"westnet-eastnet-ikev2b" #3: initiator established Child SA using #1; IPsec tunnel [192.0.100.0/24===192.0.200.0/24] {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA2_512_256 DPD=passive}
west #
 ../../guestbin/ping-once.sh --up -I 192.0.100.254 192.0.200.254
up
west #
 ipsec auto --up westnet-eastnet-ikev2c
"westnet-eastnet-ikev2c" #4: initiating Child SA using IKE SA #1
"westnet-eastnet-ikev2c" #4: sent CREATE_CHILD_SA request to create Child SA using IKE SA #1
"westnet-eastnet-ikev2c" #4: initiator established Child SA using #1; IPsec tunnel [192.0.101.0/24===192.0.201.0/24] {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA2_512_256 DPD=passive}
west #
 ipsec whack --trafficstatus
#2: "westnet-eastnet-ikev2a", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
#3: "westnet-eastnet-ikev2b", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
#4: "westnet-eastnet-ikev2c", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='@east'
west #
 ipsec status | grep westnet-eastnet-ikev2
"westnet-eastnet-ikev2a": 192.0.1.0/24===192.1.2.45[@west]...192.1.2.23[@east]===192.0.2.0/24; routed-tunnel; my_ip=unset; their_ip=unset;
"westnet-eastnet-ikev2a":   host: oriented; local: 192.1.2.45; remote: 192.1.2.23; established IKE SA: #1;
"westnet-eastnet-ikev2a":   my_updown=ipsec _updown;
"westnet-eastnet-ikev2a":   xauth us:none, xauth them:none,  my_username=[any]; their_username=[any]
"westnet-eastnet-ikev2a":   our auth:secret, their auth:secret, our autheap:none, their autheap:none;
"westnet-eastnet-ikev2a":   modecfg info: us:none, them:none, modecfg policy:push, dns:unset, domains:unset, cat:unset;
"westnet-eastnet-ikev2a":   sec_label:unset;
"westnet-eastnet-ikev2a":   ike_life: 45s; ipsec_life: 28800s; ipsec_max_bytes: 2^63B; ipsec_max_packets: 2^63; replay_window: 128; rekey_margin: 15s; rekey_fuzz: 100%;
"westnet-eastnet-ikev2a":   retransmit-interval: 9999ms; retransmit-timeout: 99s; iketcp:no; iketcp-port:4500;
"westnet-eastnet-ikev2a":   initial-contact:no; cisco-unity:no; fake-strongswan:no; send-vendorid:no; send-no-esp-tfc:no;
"westnet-eastnet-ikev2a":   policy: IKEv2+PSK+ENCRYPT+TUNNEL+UP+ESN_NO+ESN_YES;
"westnet-eastnet-ikev2a":   v2-auth-hash-policy: none;
"westnet-eastnet-ikev2a":   conn_prio: 24,24; interface: eth1; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
"westnet-eastnet-ikev2a":   nflog-group: unset; mark: unset; vti-iface:unset; vti-routing:no; vti-shared:no; nic-offload:no;
"westnet-eastnet-ikev2a":   our idtype: ID_FQDN; our id=@west; their idtype: ID_FQDN; their id=@east
"westnet-eastnet-ikev2a":   liveness: passive; dpddelay:0s; retransmit-timeout:60s
"westnet-eastnet-ikev2a":   nat-traversal: encapsulation:auto; keepalive:20s
"westnet-eastnet-ikev2a":   routing: routed-tunnel; owner: Child SA #2; established IKE SA: #1; established Child SA: #2;
"westnet-eastnet-ikev2a":   conn serial: $1;
"westnet-eastnet-ikev2a":   IKE algorithms: 3DES_CBC-HMAC_MD5-MODP2048
"westnet-eastnet-ikev2a":   IKEv2 algorithm newest: 3DES_CBC_192-HMAC_MD5-MODP2048
"westnet-eastnet-ikev2a":   ESP algorithms: AES_CBC_128-HMAC_SHA2_512_256
"westnet-eastnet-ikev2a":   ESP algorithm newest: AES_CBC_128-HMAC_SHA2_512_256; pfsgroup=<N/A>
"westnet-eastnet-ikev2b": 192.0.100.0/24===192.1.2.45[@west]...192.1.2.23[@east]===192.0.200.0/24; routed-tunnel; my_ip=unset; their_ip=unset;
"westnet-eastnet-ikev2b":   host: oriented; local: 192.1.2.45; remote: 192.1.2.23;
"westnet-eastnet-ikev2b":   my_updown=ipsec _updown;
"westnet-eastnet-ikev2b":   xauth us:none, xauth them:none,  my_username=[any]; their_username=[any]
"westnet-eastnet-ikev2b":   our auth:secret, their auth:secret, our autheap:none, their autheap:none;
"westnet-eastnet-ikev2b":   modecfg info: us:none, them:none, modecfg policy:push, dns:unset, domains:unset, cat:unset;
"westnet-eastnet-ikev2b":   sec_label:unset;
"westnet-eastnet-ikev2b":   ike_life: 45s; ipsec_life: 28800s; ipsec_max_bytes: 2^63B; ipsec_max_packets: 2^63; replay_window: 128; rekey_margin: 15s; rekey_fuzz: 100%;
"westnet-eastnet-ikev2b":   retransmit-interval: 9999ms; retransmit-timeout: 99s; iketcp:no; iketcp-port:4500;
"westnet-eastnet-ikev2b":   initial-contact:no; cisco-unity:no; fake-strongswan:no; send-vendorid:no; send-no-esp-tfc:no;
"westnet-eastnet-ikev2b":   policy: IKEv2+PSK+ENCRYPT+TUNNEL+UP+ESN_NO+ESN_YES;
"westnet-eastnet-ikev2b":   v2-auth-hash-policy: none;
"westnet-eastnet-ikev2b":   conn_prio: 24,24; interface: eth1; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
"westnet-eastnet-ikev2b":   nflog-group: unset; mark: unset; vti-iface:unset; vti-routing:no; vti-shared:no; nic-offload:no;
"westnet-eastnet-ikev2b":   our idtype: ID_FQDN; our id=@west; their idtype: ID_FQDN; their id=@east
"westnet-eastnet-ikev2b":   liveness: passive; dpddelay:0s; retransmit-timeout:60s
"westnet-eastnet-ikev2b":   nat-traversal: encapsulation:auto; keepalive:20s
"westnet-eastnet-ikev2b":   routing: routed-tunnel; owner: Child SA #3; established Child SA: #3;
"westnet-eastnet-ikev2b":   conn serial: $2;
"westnet-eastnet-ikev2b":   IKE algorithms: 3DES_CBC-HMAC_MD5-MODP2048
"westnet-eastnet-ikev2b":   ESP algorithms: AES_CBC_128-HMAC_SHA2_512_256
"westnet-eastnet-ikev2b":   ESP algorithm newest: AES_CBC_128-HMAC_SHA2_512_256; pfsgroup=<N/A>
"westnet-eastnet-ikev2c": 192.0.101.0/24===192.1.2.45[@west]...192.1.2.23[@east]===192.0.201.0/24; routed-tunnel; my_ip=unset; their_ip=unset;
"westnet-eastnet-ikev2c":   host: oriented; local: 192.1.2.45; remote: 192.1.2.23;
"westnet-eastnet-ikev2c":   my_updown=ipsec _updown;
"westnet-eastnet-ikev2c":   xauth us:none, xauth them:none,  my_username=[any]; their_username=[any]
"westnet-eastnet-ikev2c":   our auth:secret, their auth:secret, our autheap:none, their autheap:none;
"westnet-eastnet-ikev2c":   modecfg info: us:none, them:none, modecfg policy:push, dns:unset, domains:unset, cat:unset;
"westnet-eastnet-ikev2c":   sec_label:unset;
"westnet-eastnet-ikev2c":   ike_life: 45s; ipsec_life: 28800s; ipsec_max_bytes: 2^63B; ipsec_max_packets: 2^63; replay_window: 128; rekey_margin: 15s; rekey_fuzz: 100%;
"westnet-eastnet-ikev2c":   retransmit-interval: 9999ms; retransmit-timeout: 99s; iketcp:no; iketcp-port:4500;
"westnet-eastnet-ikev2c":   initial-contact:no; cisco-unity:no; fake-strongswan:no; send-vendorid:no; send-no-esp-tfc:no;
"westnet-eastnet-ikev2c":   policy: IKEv2+PSK+ENCRYPT+TUNNEL+UP+ESN_NO+ESN_YES;
"westnet-eastnet-ikev2c":   v2-auth-hash-policy: none;
"westnet-eastnet-ikev2c":   conn_prio: 24,24; interface: eth1; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
"westnet-eastnet-ikev2c":   nflog-group: unset; mark: unset; vti-iface:unset; vti-routing:no; vti-shared:no; nic-offload:no;
"westnet-eastnet-ikev2c":   our idtype: ID_FQDN; our id=@west; their idtype: ID_FQDN; their id=@east
"westnet-eastnet-ikev2c":   liveness: passive; dpddelay:0s; retransmit-timeout:60s
"westnet-eastnet-ikev2c":   nat-traversal: encapsulation:auto; keepalive:20s
"westnet-eastnet-ikev2c":   routing: routed-tunnel; owner: Child SA #4; established Child SA: #4;
"westnet-eastnet-ikev2c":   conn serial: $3;
"westnet-eastnet-ikev2c":   IKE algorithms: 3DES_CBC-HMAC_MD5-MODP2048
"westnet-eastnet-ikev2c":   ESP algorithms: AES_CBC_128-HMAC_SHA2_512_256
"westnet-eastnet-ikev2c":   ESP algorithm newest: AES_CBC_128-HMAC_SHA2_512_256; pfsgroup=<N/A>
#1: "westnet-eastnet-ikev2a":500 ESTABLISHED_IKE_SA (established IKE SA); REKEY in XXs; REPLACE in XXs; newest; idle;
#2: "westnet-eastnet-ikev2a":500 ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; REPLACE in XXs; newest; eroute owner; IKE SA #1; idle;
#2: "westnet-eastnet-ikev2a" esp.ESPSPIi@192.1.2.23 esp.ESPSPIi@192.1.2.45 tun.0@192.1.2.23 tun.0@192.1.2.45 Traffic: ESPin=84B ESPout=84B ESPmax=2^63B 
#3: "westnet-eastnet-ikev2b":500 ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; REPLACE in XXs; newest; eroute owner; IKE SA #1; idle;
#3: "westnet-eastnet-ikev2b" esp.ESPSPIi@192.1.2.23 esp.ESPSPIi@192.1.2.45 tun.0@192.1.2.23 tun.0@192.1.2.45 Traffic: ESPin=84B ESPout=84B ESPmax=2^63B 
#4: "westnet-eastnet-ikev2c":500 ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; REPLACE in XXs; newest; eroute owner; IKE SA #1; idle;
#4: "westnet-eastnet-ikev2c" esp.ESPSPIi@192.1.2.23 esp.ESPSPIi@192.1.2.45 tun.0@192.1.2.23 tun.0@192.1.2.45 Traffic: ESPin=0B ESPout=0B ESPmax=2^63B 
west #
 echo done
done
west #
 echo done
done
west #
 if [ -f /var/run/charon.pid -o -f /var/run/strongswan/charon.pid ]; then strongswan status ; fi
west #
 
