/testing/guestbin/swan-prep --46 --nokey
Creating empty NSS database
road #
 ../../guestbin/ip.sh address show eth0 | grep global | sort
    inet 192.1.3.209/24 scope global eth0
    inet6 2001:db8:1:3::209/64 scope global
road #
 ipsec start
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec auto --add road
"road": connection is using multiple subnets
"road": added IKEv2 connection
road #
 echo "initdone"
initdone
road #
 ipsec up road
"road" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"road" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"road" #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
"road" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"road" #1: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
"road" #2: accepted selectors [192.0.3.0/24]->[192.0.2.0/24 192.0.20.0/24]
"road" #2: running updown up 192.0.3.0/24===192.0.2.0/24
"road" #2: running updown up 192.0.3.0/24===192.0.20.0/24
"road" #2: running updown prepare 192.0.3.0/24===192.0.2.0/24
"road" #2: running updown prepare 192.0.3.0/24===192.0.20.0/24
"road" #2: running updown route 192.0.3.0/24===192.0.2.0/24
"road" #2: running updown route 192.0.3.0/24===192.0.20.0/24
"road" #2: initiator established Child SA using #1; IPsec tunnel [192.0.3.0/24===192.0.2.0/24] [192.0.3.0/24===192.0.20.0/24] {ESPinUDP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE NATD=192.1.2.23:4500 DPD=passive}
road #
 ../../guestbin/ipsec-look.sh
road NOW
XFRM state:
src 192.1.2.23 dst 192.1.3.209
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
src 192.1.3.209 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
XFRM policy:
src 192.0.2.0/24 dst 192.0.3.0/24
	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 192.0.3.0/24
	dir in priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
src 192.0.20.0/24 dst 192.0.3.0/24
	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.20.0/24 dst 192.0.3.0/24
	dir in priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
src 192.0.3.0/24 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.3.0/24 dst 192.0.20.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 ::/0 dst ::/0 proto ipv6-icmp type 135
	dir fwd priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 135
	dir in priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 135
	dir out priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 136
	dir fwd priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 136
	dir in priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 136
	dir out priority PRIORITY ptype main
XFRM done
IPSEC mangle TABLES
iptables filter TABLE
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ROUTING TABLES
default via 192.1.3.254 dev eth0
192.0.2.0/24 dev eth0 scope link src 192.0.3.254
192.0.20.0/24 dev eth0 scope link src 192.0.3.254
192.1.3.0/24 dev eth0 proto kernel scope link src 192.1.3.209
2001:db8:1:3::/64 dev eth0 proto kernel metric 256
fe80::/64 dev eth0 proto kernel metric 256
default via 2001:db8:1:3::254 dev eth0
NSS_CERTIFICATES
Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI
road #
 ../../guestbin/ping-once.sh --up 192.0.2.254
up
road #
 ../../guestbin/ping-once.sh --up 192.0.20.254
up
road #
 # non-zero counts confirm encrypted traffic flowing
road #
 ipsec trafficstatus
#2: "road", type=ESP, add_time=1234567890, inBytes=168, outBytes=168, maxBytes=2^63B, id='@east'
road #
 
