/testing/guestbin/swan-prep  --x509
Preparing X.509 files
east #
 certutil -D -n road -d sql:/etc/ipsec.d
east #
 cp east-ikev2-oe.conf /etc/ipsec.d/ikev2-oe.conf
east #
 cp policies/* /etc/ipsec.d/policies/
east #
 echo "192.1.3.0/24"  >> /etc/ipsec.d/policies/clear-or-private
east #
 ipsec start
Redirecting to: [initsystem]
east #
 ../../guestbin/wait-until-pluto-started
east #
 ipsec whack --impair suppress-retransmits
east #
 # give OE policies time to load
east #
 ../../guestbin/wait-for.sh --match 'loaded 11,' -- ipsec auto --status
000 Total IPsec connections: loaded 11, active 0
east #
 echo "initdone"
initdone
east #
 ../../guestbin/ipsec-look.sh
east NOW
XFRM state:
src 192.1.3.209 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 32 flag af-unspec
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
src 192.1.2.23 dst 192.1.3.209
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 32 flag af-unspec
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
XFRM policy:
src 192.1.2.23/32 dst 192.1.2.253/32
	dir out priority 3129279 ptype main
src 192.1.2.23/32 dst 192.1.2.254/32
	dir out priority 3129279 ptype main
src 192.1.2.23/32 dst 192.1.3.209/32
	dir out priority 3129279 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.1.3.253/32
	dir out priority 3129279 ptype main
src 192.1.2.23/32 dst 192.1.3.254/32
	dir out priority 3129279 ptype main
src 192.1.2.253/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
src 192.1.2.253/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
src 192.1.2.254/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
src 192.1.2.254/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
src 192.1.3.209/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
	tmpl src 192.1.3.209 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.1.3.209/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
	tmpl src 192.1.3.209 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.1.3.253/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
src 192.1.3.253/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
src 192.1.3.254/32 dst 192.1.2.23/32
	dir fwd priority 3129279 ptype main
src 192.1.3.254/32 dst 192.1.2.23/32
	dir in priority 3129279 ptype main
XFRM done
IPSEC mangle TABLES
NEW_IPSEC_CONN mangle TABLES
ROUTING TABLES
default via 192.1.2.254 dev eth1
192.0.1.0/24 via 192.1.2.45 dev eth1
192.0.2.0/24 dev eth0 proto kernel scope link src 192.0.2.254
192.1.2.0/24 dev eth1 proto kernel scope link src 192.1.2.23
NSS_CERTIFICATES
Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI
Libreswan test CA for mainca - Libreswan                     CT,, 
east                                                         u,u,u
hashsha1                                                     P,,  
nic                                                          P,,  
north                                                        P,,  
west                                                         P,,  
west-ec                                                      P,,  
east #
 hostname | grep nic > /dev/null || ipsec whack --trafficstatus
006 #2: "clear-or-private#192.1.3.0/24"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=84, outBytes=84, id='ID_NULL'
east #
 # A tunnel should have established
east #
 grep "^[^|].*: established Child SA" /tmp/pluto.log
"clear-or-private#192.1.3.0/24"[1] ...192.1.3.209 #2: established Child SA; IPsec tunnel [192.1.2.23-192.1.2.23:0-65535 0] -> [192.1.3.209-192.1.3.209:0-65535 0] {ESP=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE NATOA=none NATD=none DPD=passive}
east #
 # you should see both RSA and NULL
east #
 grep -e 'auth method: ' -e 'hash algorithm identifier' -e "^[^|].*: established IKE SA" /tmp/pluto.log
| 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)
| 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
|    auth method: IKEv2_AUTH_NULL (0xd)
"clear-or-private#192.1.3.0/24"[1] ...192.1.3.209 #1: established IKE SA; authenticated using authby=null and peer ID_NULL 'ID_NULL'
|    auth method: IKEv2_AUTH_DIGSIG (0xe)
east #
 
