/testing/guestbin/swan-prep --x509
Preparing X.509 files
road #
 ../../guestbin/ip.sh address add 192.1.3.210/24 dev eth0
road #
 ipsec start
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec whack --impair suppress_retransmits
road #
 ipsec auto --add rw-lte
"rw-lte": added IKEv2 connection
road #
 ipsec auto --add rw-wifi
"rw-wifi": added IKEv2 connection
road #
 echo "initdone"
initdone
road #
 ipsec auto --up rw-lte
"rw-lte"[1] 192.1.2.23 #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"rw-lte"[1] 192.1.2.23 #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"rw-lte"[1] 192.1.2.23 #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"rw-lte"[1] 192.1.2.23 #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"rw-lte"[1] 192.1.2.23 #1: initiator established IKE SA; authenticated peer certificate '@east.testing.libreswan.org' and 3nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
"rw-lte"[1] 192.1.2.23 #2: received INTERNAL_IP4_ADDRESS 100.64.0.1
"rw-lte"[1] 192.1.2.23 #2: received INTERNAL_IP4_DNS 1.2.3.4
"rw-lte"[1] 192.1.2.23 #2: received INTERNAL_IP4_DNS 8.8.8.8
"rw-lte"[1] 192.1.2.23 #2: up-client output: updating resolvconf
"rw-lte"[1] 192.1.2.23 #2: initiator established Child SA using #1; IPsec tunnel [100.64.0.1/32===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
road #
 ../../guestbin/ping-once.sh --up -I 100.64.0.1 192.0.2.254
up
road #
 ipsec whack --trafficstatus
#2: "rw-lte"[1] 192.1.2.23, type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east.testing.libreswan.org', lease=100.64.0.1/32
road #
 ipsec auto --up rw-wifi
"rw-wifi"[1] 192.1.2.23 #3: initiating IKEv2 connection to 192.1.2.23 using UDP
"rw-wifi"[1] 192.1.2.23 #3: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"rw-wifi"[1] 192.1.2.23 #3: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"rw-wifi"[1] 192.1.2.23 #3: sent IKE_AUTH request to 192.1.2.23:UDP/500
"rw-wifi"[1] 192.1.2.23 #3: initiator established IKE SA; authenticated peer certificate '@east.testing.libreswan.org' and 3nnn-bit RSASSA-PSS with SHA2_512 digital signature issued by 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
"rw-wifi"[1] 192.1.2.23 #4: received INTERNAL_IP4_ADDRESS 100.64.0.2
"rw-wifi"[1] 192.1.2.23 #4: received INTERNAL_IP4_DNS 1.2.3.4
"rw-wifi"[1] 192.1.2.23 #4: received INTERNAL_IP4_DNS 8.8.8.8
"rw-wifi"[1] 192.1.2.23 #4: up-client output: updating resolvconf
"rw-wifi"[1] 192.1.2.23 #4: up-client output: Current resolv.conf is generated by Libreswan, not creating a new backup
"rw-wifi"[1] 192.1.2.23 #4: initiator established Child SA using #3; IPsec tunnel [100.64.0.2/32===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
road #
 # both should remain up and working - aka wifi-assist
road #
 ../../guestbin/ping-once.sh --up -I 100.64.0.2 192.0.2.254
up
road #
 ../../guestbin/ping-once.sh --up -I 100.64.0.1 192.0.2.254
up
road #
 ipsec whack --trafficstatus
#2: "rw-lte"[1] 192.1.2.23, type=ESP, add_time=1234567890, inBytes=168, outBytes=168, maxBytes=2^63B, id='@east.testing.libreswan.org', lease=100.64.0.1/32
#4: "rw-wifi"[1] 192.1.2.23, type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east.testing.libreswan.org', lease=100.64.0.2/32
road #
 echo done
done
road #
 # should show two full sets of policies on both road and east
road #
 ip xfrm policy
src 100.64.0.2/32 dst 192.0.2.0/24 
	dir out priority PRIORITY ptype main 
	tmpl src 192.1.3.210 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.0.2.0/24 dst 100.64.0.2/32 
	dir fwd priority PRIORITY ptype main 
	tmpl src 192.1.2.23 dst 192.1.3.210
		proto esp reqid REQID mode tunnel
src 192.0.2.0/24 dst 100.64.0.2/32 
	dir in priority PRIORITY ptype main 
	tmpl src 192.1.2.23 dst 192.1.3.210
		proto esp reqid REQID mode tunnel
src 100.64.0.1/32 dst 192.0.2.0/24 
	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.0.2.0/24 dst 100.64.0.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.0.2.0/24 dst 100.64.0.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 
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 #
 
