/testing/guestbin/swan-prep kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# # confirm that the network is alive kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# ../../pluto/bin/wait-until-alive -I 192.0.1.254 192.0.2.254 destination -I 192.0.1.254 192.0.2.254 is alive kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# # ensure that clear text does not get through kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# iptables -A INPUT -i eth1 -s 192.0.2.0/24 -j LOGDROP kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# iptables -I INPUT -m policy --dir in --pol ipsec -j ACCEPT kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# # confirm clear text does not get through kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# ../../pluto/bin/ping-once.sh --down -I 192.0.1.254 192.0.2.254 ==== cut ==== ping -q -n -c 1 -i 2 -w 1 -I 192.0.1.254 192.0.2.254 ==== tuc ==== ==== cut ==== PING 192.0.2.254 (192.0.2.254) from 192.0.1.254 : 56(84) bytes of data. --- 192.0.2.254 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms ==== tuc ==== down kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# ipsec start Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Redirecting to: /etc/init.d/ipsec start Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Error: Peer netns reference is invalid. Starting pluto IKE daemon for IPsec: kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# /testing/pluto/bin/wait-until-pluto-started kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# ipsec auto --add westnet-eastnet-ipv4-psk-ikev2 002 added connection description "westnet-eastnet-ipv4-psk-ikev2" kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# echo "initdone" initdone kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# # this should fail, our testing cannot wait for whack to release, so use async kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# ipsec auto --up --asynchronous westnet-eastnet-ipv4-psk-ikev2 002 "westnet-eastnet-ipv4-psk-ikev2" #1: initiating v2 parent SA 181 "westnet-eastnet-ipv4-psk-ikev2" #1: initiate 002 "westnet-eastnet-ipv4-psk-ikev2": constructed local IKE proposals for westnet-eastnet-ipv4-psk-ikev2 (IKE SA initiator selecting KE): 1:IKE:ENCR=AES_GCM_C_256;PRF=HMAC_SHA2_512,HMAC_SHA2_256;INTEG=NONE;DH=MODP2048,MODP3072,MODP4096,MODP8192,ECP_256,ECP_384,ECP_521,CURVE25519 2:IKE:ENCR=AES_GCM_C_128;PRF=HMAC_SHA2_512,HMAC_SHA2_256;INTEG=NONE;DH=MODP2048,MODP3072,MODP4096,MODP8192,ECP_256,ECP_384,ECP_521,CURVE25519 3:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_512,HMAC_SHA2_256;INTEG=HMAC_SHA2_512_256,HMAC_SHA2_256_128;DH=MODP2048,MODP3072,MODP4096,MODP8192,ECP_256,ECP_384,ECP_521,CURVE25519 4:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA2_512,HMAC_SHA2_256;INTEG=HMAC_SHA2_512_256,HMAC_SHA2_256_128;DH=MODP2048,MODP3072,MODP4096,MODP8192,ECP_256,ECP_384,ECP_521,CURVE25519 kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# sleep 30 kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# sleep 30 kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# sleep 30 kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# # the state should have been deleted, but replaced via EVENT_SA_REPLACE with a new state trying kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# # if no STATE_s show up, this test failed kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# ipsec status |grep STATE_ || echo "test failed, all states went away" whack: is Pluto running? connect() for "/run/pluto/pluto.ctl" failed (111 Connection refused) test failed, all states went away kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# echo done done kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# ../../pluto/bin/ipsec-look.sh ==== cut ==== start raw xfrm state: end raw xfrm state: ==== tuc ==== west Mon Aug 26 13:11:54 UTC 2019 XFRM state: XFRM policy: 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 dev eth0 proto kernel scope link src 192.0.1.254 192.0.2.0/24 via 192.1.2.23 dev eth1 192.1.2.0/24 dev eth1 proto kernel scope link src 192.1.2.45 NSS_CERTIFICATES Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# : ==== cut ==== kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries]# ipsec auto --status whack: is Pluto running? connect() for "/run/pluto/pluto.ctl" failed (111 Connection refused) kroot@swantest:/home/build/libreswan/testing/pluto/ikev2-26-keyingtries\[root@west ikev2-26-keyingtries 33]# >>>>>>>>>>cutnonzeroexit>>>>>>>>>> exit status 33 final.sh 'ipsec auto --status' <<<<<<<<<