/testing/guestbin/swan-prep --x509
Preparing X.509 files
road #
 certutil -D -n road -d sql:/etc/ipsec.d
road #
 certutil -D -n east -d sql:/etc/ipsec.d
road #
 cp road-ikev2-oe.conf /etc/ipsec.d/ikev2-oe.conf
road #
 cp policies/* /etc/ipsec.d/policies/
road #
 echo "192.1.3.128/27"  >> /etc/ipsec.d/policies/private-or-clear
road #
 ipsec start
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec whack --impair suppress-retransmits
road #
 # give OE policies time to load
road #
 ../../guestbin/wait-for.sh --match 'loaded 10' -- ipsec auto --status
000 Total IPsec connections: loaded 10, active 0
road #
 echo "initdone"
initdone
road #
 # one packet, which gets eaten by XFRM, so east does not initiate
road #
 ../../guestbin/ping-once.sh --down -I 192.1.3.209 192.1.3.130
down
road #
 # wait on OE IKE negotiation
road #
 # ping should succeed through tunnel
road #
 ../../guestbin/ping-once.sh --up -I 192.1.3.209 192.1.3.130
up
road #
 sleep 1
road #
 # should show established tunnel and no bare shunts
road #
 ipsec whack --trafficstatus
006 #2: "private-or-clear#192.1.3.128/27"[1] ...192.1.3.130, type=ESP, add_time=1234567890, inBytes=84, outBytes=84, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org'
road #
 ipsec whack --shuntstatus
000 Bare Shunt list:
000  
road #
 echo done
done
road #
 # A tunnel should have established with non-zero byte counters
road #
 hostname | grep nic > /dev/null || ipsec trafficstatus
road #
 ../../guestbin/ipsec-look.sh
road NOW
XFRM state:
src 192.1.3.209 dst 192.1.3.130
	proto esp spi 0x00000000 reqid 0 mode transport
	replay-window 0 
	sel src 192.1.3.209/32 dst 192.1.3.130/32 proto icmp type 8 code 0 dev eth0 
XFRM policy:
src 192.1.2.253/32 dst 192.1.3.209/32
	dir fwd priority 3129279 ptype main
src 192.1.2.253/32 dst 192.1.3.209/32
	dir in priority 3129279 ptype main
src 192.1.2.254/32 dst 192.1.3.209/32
	dir fwd priority 3129279 ptype main
src 192.1.2.254/32 dst 192.1.3.209/32
	dir in priority 3129279 ptype main
src 192.1.3.209/32 dst 192.1.2.253/32
	dir out priority 3129279 ptype main
src 192.1.3.209/32 dst 192.1.2.254/32
	dir out priority 3129279 ptype main
src 192.1.3.209/32 dst 192.1.3.253/32
	dir out priority 3129279 ptype main
src 192.1.3.209/32 dst 192.1.3.254/32
	dir out priority 3129279 ptype main
src 192.1.3.253/32 dst 192.1.3.209/32
	dir fwd priority 3129279 ptype main
src 192.1.3.253/32 dst 192.1.3.209/32
	dir in priority 3129279 ptype main
src 192.1.3.254/32 dst 192.1.3.209/32
	dir fwd priority 3129279 ptype main
src 192.1.3.254/32 dst 192.1.3.209/32
	dir in priority 3129279 ptype main
src 192.1.3.209/32 dst 192.1.3.128/27
	dir out priority 3129288 ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid 0 mode transport
XFRM done
IPSEC mangle TABLES
NEW_IPSEC_CONN mangle TABLES
ROUTING TABLES
default via 192.1.3.254 dev eth0
192.1.3.0/24 dev eth0 proto kernel scope link src 192.1.3.209
NSS_CERTIFICATES
Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI
Libreswan test CA for mainca - Libreswan                     CT,, 
east-ec                                                      P,,  
hashsha1                                                     P,,  
nic                                                          P,,  
north                                                        P,,  
west                                                         P,,  
west-ec                                                      P,,  
road #
 # you should see both RSA and NULL
road #
 grep -e 'auth method: ' -e 'hash algorithm identifier' -e "^[^|].*: established IKE SA" /tmp/pluto.log
| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_256 into IKEv2 Notify Payload
| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_256: 00 02
| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_384 into IKEv2 Notify Payload
| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_384: 00 03
| emitting 2 raw bytes of hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_512 into IKEv2 Notify Payload
| hash algorithm identifier IKEv2_HASH_ALGORITHM_SHA2_512: 00 04
| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
| hash algorithm identifier (network ordered)
| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
| hash algorithm identifier (network ordered)
| parsing 2 raw bytes of IKEv2 Notify Payload into hash algorithm identifier (network ordered)
| hash algorithm identifier (network ordered)
|    auth method: IKEv2_AUTH_NULL (0xd)
|    auth method: IKEv2_AUTH_DIGSIG (0xe)
"private-or-clear#192.1.3.128/27"[1] ...192.1.3.130 #1: established IKE SA; authenticated using RSA with SHA2_512 and peer certificate 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=east.testing.libreswan.org, E=user-east@testing.libreswan.org' issued by CA 'C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=Libreswan test CA for mainca, E=testing@libreswan.org'
road #
 
