/testing/guestbin/swan-prep --x509
Preparing X.509 files
road #
 ipsec start
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec whack --impair suppress_retransmits
road #
 ipsec whack --impair revival
road #
 ipsec auto --add westnet-eastnet-ipv4-psk-ikev1
"westnet-eastnet-ipv4-psk-ikev1": added IKEv1 connection
road #
 echo "initdone"
initdone
road #
 ipsec whack --xauthname 'use3' --xauthpass 'use1pass' --initiate --name westnet-eastnet-ipv4-psk-ikev1
"westnet-eastnet-ipv4-psk-ikev1" #1: initiating IKEv1 Main Mode connection
"westnet-eastnet-ipv4-psk-ikev1" #1: sent Main Mode request
"westnet-eastnet-ipv4-psk-ikev1" #1: sent Main Mode I2
"westnet-eastnet-ipv4-psk-ikev1" #1: I am sending my cert
"westnet-eastnet-ipv4-psk-ikev1" #1: I am sending a certificate request
"westnet-eastnet-ipv4-psk-ikev1" #1: sent Main Mode I3
"westnet-eastnet-ipv4-psk-ikev1" #1: Peer ID is ID_DER_ASN1_DN: 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
"westnet-eastnet-ipv4-psk-ikev1" #1: authenticated peer certificate 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org' and 2nnn-bit RSA with SHA1 signature issued by 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
"westnet-eastnet-ipv4-psk-ikev1" #1: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #1: prompt for Username:
"westnet-eastnet-ipv4-psk-ikev1" #1: prompt for Password:
"westnet-eastnet-ipv4-psk-ikev1" #1: XAUTH: Answering XAUTH challenge with user='use3'
"westnet-eastnet-ipv4-psk-ikev1" #1: XAUTH client - possibly awaiting CFG_set {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #1: XAUTH: Successfully Authenticated
"westnet-eastnet-ipv4-psk-ikev1" #1: XAUTH client - possibly awaiting CFG_set {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #1: Received IP address 192.0.2.1/32
"westnet-eastnet-ipv4-psk-ikev1" #1: setting ip source address to 192.0.2.1/32
"westnet-eastnet-ipv4-psk-ikev1" #1: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #2: initiating Quick Mode IKEv1+RSASIG+ENCRYPT+TUNNEL+PFS+UP+XAUTH+IKE_FRAG_ALLOW+ESN_NO+ESN_YES
"westnet-eastnet-ipv4-psk-ikev1" #2: sent Quick Mode request
"westnet-eastnet-ipv4-psk-ikev1" #2: IPsec SA established tunnel mode {ESPinUDP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 NATD=192.1.2.23:4500 DPD=passive username=use3}
road #
 ../../guestbin/ping-once.sh --up -I 192.0.2.1 192.1.2.23
up
road #
 ipsec whack --trafficstatus
#2: "westnet-eastnet-ipv4-psk-ikev1", username=use3, type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B
road #
 # create havoc
road #
 ipsec whack --impair send_no_delete
road #
 # #3.#4
road #
 ipsec auto --add westnet-eastnet-ipv4-psk-ikev1
"westnet-eastnet-ipv4-psk-ikev1": terminating SAs using this connection
"westnet-eastnet-ipv4-psk-ikev1" #2: IMPAIR: deleting IPsec SA (QUICK_I2) and NOT sending notification
"westnet-eastnet-ipv4-psk-ikev1" #2: ESP traffic information: in=84B out=84B XAUTHuser=use3
"westnet-eastnet-ipv4-psk-ikev1" #1: IMPAIR: deleting ISAKMP SA (MAIN_I4) and NOT sending notification
"westnet-eastnet-ipv4-psk-ikev1": added IKEv1 connection
road #
 ipsec whack --xauthname 'use3' --xauthpass 'use1pass' --initiate --name westnet-eastnet-ipv4-psk-ikev1
"westnet-eastnet-ipv4-psk-ikev1" #3: initiating IKEv1 Main Mode connection
"westnet-eastnet-ipv4-psk-ikev1" #3: sent Main Mode request
"westnet-eastnet-ipv4-psk-ikev1" #3: sent Main Mode I2
"westnet-eastnet-ipv4-psk-ikev1" #3: I am sending my cert
"westnet-eastnet-ipv4-psk-ikev1" #3: I am sending a certificate request
"westnet-eastnet-ipv4-psk-ikev1" #3: sent Main Mode I3
"westnet-eastnet-ipv4-psk-ikev1" #3: Peer ID is ID_DER_ASN1_DN: 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
"westnet-eastnet-ipv4-psk-ikev1" #3: authenticated peer certificate 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org' and 2nnn-bit RSA with SHA1 signature issued by 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
"westnet-eastnet-ipv4-psk-ikev1" #3: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #3: prompt for Username:
"westnet-eastnet-ipv4-psk-ikev1" #3: prompt for Password:
"westnet-eastnet-ipv4-psk-ikev1" #3: XAUTH: Answering XAUTH challenge with user='use3'
"westnet-eastnet-ipv4-psk-ikev1" #3: XAUTH client - possibly awaiting CFG_set {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #3: XAUTH: Successfully Authenticated
"westnet-eastnet-ipv4-psk-ikev1" #3: XAUTH client - possibly awaiting CFG_set {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #3: Received IP address 192.0.2.1/32
"westnet-eastnet-ipv4-psk-ikev1" #3: setting ip source address to 192.0.2.1/32
"westnet-eastnet-ipv4-psk-ikev1" #3: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #4: initiating Quick Mode IKEv1+RSASIG+ENCRYPT+TUNNEL+PFS+UP+XAUTH+IKE_FRAG_ALLOW+ESN_NO+ESN_YES
"westnet-eastnet-ipv4-psk-ikev1" #4: sent Quick Mode request
"westnet-eastnet-ipv4-psk-ikev1" #4: IPsec SA established tunnel mode {ESPinUDP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 NATD=192.1.2.23:4500 DPD=passive username=use3}
road #
 # #5.#6
road #
 ipsec auto --add westnet-eastnet-ipv4-psk-ikev1
"westnet-eastnet-ipv4-psk-ikev1": terminating SAs using this connection
"westnet-eastnet-ipv4-psk-ikev1" #4: IMPAIR: deleting IPsec SA (QUICK_I2) and NOT sending notification
"westnet-eastnet-ipv4-psk-ikev1" #4: ESP traffic information: in=0B out=0B XAUTHuser=use3
"westnet-eastnet-ipv4-psk-ikev1" #3: IMPAIR: deleting ISAKMP SA (MAIN_I4) and NOT sending notification
"westnet-eastnet-ipv4-psk-ikev1": added IKEv1 connection
road #
 ipsec whack --xauthname 'use3' --xauthpass 'use1pass' --initiate --name westnet-eastnet-ipv4-psk-ikev1
"westnet-eastnet-ipv4-psk-ikev1" #5: initiating IKEv1 Main Mode connection
"westnet-eastnet-ipv4-psk-ikev1" #5: sent Main Mode request
"westnet-eastnet-ipv4-psk-ikev1" #5: sent Main Mode I2
"westnet-eastnet-ipv4-psk-ikev1" #5: I am sending my cert
"westnet-eastnet-ipv4-psk-ikev1" #5: I am sending a certificate request
"westnet-eastnet-ipv4-psk-ikev1" #5: sent Main Mode I3
"westnet-eastnet-ipv4-psk-ikev1" #5: Peer ID is ID_DER_ASN1_DN: 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
"westnet-eastnet-ipv4-psk-ikev1" #5: authenticated peer certificate 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org' and 2nnn-bit RSA with SHA1 signature issued by 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
"westnet-eastnet-ipv4-psk-ikev1" #5: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #5: prompt for Username:
"westnet-eastnet-ipv4-psk-ikev1" #5: prompt for Password:
"westnet-eastnet-ipv4-psk-ikev1" #5: XAUTH: Answering XAUTH challenge with user='use3'
"westnet-eastnet-ipv4-psk-ikev1" #5: XAUTH client - possibly awaiting CFG_set {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #5: XAUTH: Successfully Authenticated
"westnet-eastnet-ipv4-psk-ikev1" #5: XAUTH client - possibly awaiting CFG_set {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #5: Received IP address 192.0.2.1/32
"westnet-eastnet-ipv4-psk-ikev1" #5: setting ip source address to 192.0.2.1/32
"westnet-eastnet-ipv4-psk-ikev1" #5: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #6: initiating Quick Mode IKEv1+RSASIG+ENCRYPT+TUNNEL+PFS+UP+XAUTH+IKE_FRAG_ALLOW+ESN_NO+ESN_YES
"westnet-eastnet-ipv4-psk-ikev1" #6: sent Quick Mode request
"westnet-eastnet-ipv4-psk-ikev1" #6: IPsec SA established tunnel mode {ESPinUDP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 NATD=192.1.2.23:4500 DPD=passive username=use3}
road #
 # #7.#8
road #
 ipsec auto --add westnet-eastnet-ipv4-psk-ikev1
"westnet-eastnet-ipv4-psk-ikev1": terminating SAs using this connection
"westnet-eastnet-ipv4-psk-ikev1" #6: IMPAIR: deleting IPsec SA (QUICK_I2) and NOT sending notification
"westnet-eastnet-ipv4-psk-ikev1" #6: ESP traffic information: in=0B out=0B XAUTHuser=use3
"westnet-eastnet-ipv4-psk-ikev1" #5: IMPAIR: deleting ISAKMP SA (MAIN_I4) and NOT sending notification
"westnet-eastnet-ipv4-psk-ikev1": added IKEv1 connection
road #
 ipsec whack --xauthname 'use3' --xauthpass 'use1pass' --initiate --name westnet-eastnet-ipv4-psk-ikev1
"westnet-eastnet-ipv4-psk-ikev1" #7: initiating IKEv1 Main Mode connection
"westnet-eastnet-ipv4-psk-ikev1" #7: sent Main Mode request
"westnet-eastnet-ipv4-psk-ikev1" #7: sent Main Mode I2
"westnet-eastnet-ipv4-psk-ikev1" #7: I am sending my cert
"westnet-eastnet-ipv4-psk-ikev1" #7: I am sending a certificate request
"westnet-eastnet-ipv4-psk-ikev1" #7: sent Main Mode I3
"westnet-eastnet-ipv4-psk-ikev1" #7: Peer ID is ID_DER_ASN1_DN: 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
"westnet-eastnet-ipv4-psk-ikev1" #7: authenticated peer certificate 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org' and 2nnn-bit RSA with SHA1 signature issued by 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
"westnet-eastnet-ipv4-psk-ikev1" #7: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #7: prompt for Username:
"westnet-eastnet-ipv4-psk-ikev1" #7: prompt for Password:
"westnet-eastnet-ipv4-psk-ikev1" #7: XAUTH: Answering XAUTH challenge with user='use3'
"westnet-eastnet-ipv4-psk-ikev1" #7: XAUTH client - possibly awaiting CFG_set {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #7: XAUTH: Successfully Authenticated
"westnet-eastnet-ipv4-psk-ikev1" #7: XAUTH client - possibly awaiting CFG_set {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #7: Received IP address 192.0.2.1/32
"westnet-eastnet-ipv4-psk-ikev1" #7: setting ip source address to 192.0.2.1/32
"westnet-eastnet-ipv4-psk-ikev1" #7: ISAKMP SA established {auth=RSA_SIG cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
"westnet-eastnet-ipv4-psk-ikev1" #8: initiating Quick Mode IKEv1+RSASIG+ENCRYPT+TUNNEL+PFS+UP+XAUTH+IKE_FRAG_ALLOW+ESN_NO+ESN_YES
"westnet-eastnet-ipv4-psk-ikev1" #8: sent Quick Mode request
"westnet-eastnet-ipv4-psk-ikev1" #8: IPsec SA established tunnel mode {ESPinUDP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 NATD=192.1.2.23:4500 DPD=passive username=use3}
road #
 # twice so numbers change
road #
 ../../guestbin/ping-once.sh --up -I 192.0.2.1 192.1.2.23
up
road #
 ../../guestbin/ping-once.sh --up -I 192.0.2.1 192.1.2.23
up
road #
 ipsec whack --trafficstatus
#8: "westnet-eastnet-ipv4-psk-ikev1", username=use3, type=ESP, add_time=1234567890, inBytes=168, outBytes=168, maxBytes=2^63B
road #
 ipsec status | grep STATE_
#7: "westnet-eastnet-ipv4-psk-ikev1":4500 STATE_MAIN_I4 (ISAKMP SA established); RETRANSMIT in XXs; newest; lastdpd=-1s(seq in:0 out:0); idle;
#8: "westnet-eastnet-ipv4-psk-ikev1":4500 STATE_QUICK_I2 (IPsec SA established); REPLACE in XXs; newest; eroute owner; ISAKMP SA #7; idle;
road #
 ip xfrm policy
src 192.0.2.1/32 dst 192.1.2.23/32 
	dir out priority PRIORITY ptype main 
	tmpl src 192.1.3.209 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.1.2.23/32 dst 192.0.2.1/32 
	dir fwd priority PRIORITY ptype main 
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
src 192.1.2.23/32 dst 192.0.2.1/32 
	dir in priority PRIORITY ptype main 
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
src 0.0.0.0/0 dst 0.0.0.0/0 
	socket out priority 0 ptype main 
src 0.0.0.0/0 dst 0.0.0.0/0 
	socket in priority 0 ptype main 
src 0.0.0.0/0 dst 0.0.0.0/0 
	socket out priority 0 ptype main 
src 0.0.0.0/0 dst 0.0.0.0/0 
	socket in priority 0 ptype main 
src 0.0.0.0/0 dst 0.0.0.0/0 
	socket out priority 0 ptype main 
src 0.0.0.0/0 dst 0.0.0.0/0 
	socket in priority 0 ptype main 
src 0.0.0.0/0 dst 0.0.0.0/0 
	socket out priority 0 ptype main 
src 0.0.0.0/0 dst 0.0.0.0/0 
	socket in priority 0 ptype main 
road #
 
