/testing/guestbin/swan-prep --userland strongswan
road #
 # DANGER: when resolvconf, from systemd-resolved, is present,
road #
 # strongSwan unconditionally uses it over /etc/resolv.conf; this hack
road #
 # is to stop it.
road #
 #
road #
 # See https://github.com/strongswan/strongswan/issues/3013
road #
 # See https://github.com/libreswan/libreswan/issues/2635
road #
 test -r PATH/sbin/resolvconf && mv -v PATH/sbin/resolvconf{,.tmp}
renamed 'PATH/sbin/resolvconf' -> 'PATH/sbin/resolvconf.tmp'
road #
 ../../guestbin/strongswan-start.sh
loaded ike secret 'ike-'
no authorities found, 0 unloaded
no pools found, 0 unloaded
loaded connection 'client'
successfully loaded 1 connections, 0 unloaded
road #
 test -r PATH/sbin/resolvconf.tmp && mv -v PATH/sbin/resolvconf{.tmp,}
renamed 'PATH/sbin/resolvconf.tmp' -> 'PATH/sbin/resolvconf'
road #
 echo "initdone"
initdone
road #
 strongswan up client | grep -v resolv
initiating IKE_SA client[1] to 192.1.2.23
generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) N(HASH_ALG) N(REDIR_SUP) ]
sending packet: from 192.1.3.209[500] to 192.1.2.23[500] (XXX bytes)
received packet: from 192.1.2.23[500] to 192.1.3.209[500] (XXX bytes)
parsed IKE_SA_INIT response 0 [ N(INVAL_KE) ]
peer didn't accept key exchange method MODP_2048, it requested ECP_256
initiating IKE_SA client[1] to 192.1.2.23
generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) N(HASH_ALG) N(REDIR_SUP) ]
sending packet: from 192.1.3.209[500] to 192.1.2.23[500] (XXX bytes)
received packet: from 192.1.2.23[500] to 192.1.3.209[500] (XXX bytes)
parsed IKE_SA_INIT response 0 [ SA KE No N(FRAG_SUP) N(NATD_S_IP) N(NATD_D_IP) N(CHDLESS_SUP) ]
selected proposal: IKE:AES_GCM_16_256/PRF_HMAC_SHA2_512/ECP_256
local host is behind NAT, sending keep alives
no IDi configured, default to IP address 192.1.3.209
authentication of '192.1.3.209' (myself) with pre-shared key
establishing CHILD_SA client{1}
generating IKE_AUTH request 1 [ IDi AUTH CPRQ(ADDR DNS) SA TSi TSr N(MOBIKE_SUP) N(NO_ADD_ADDR) N(EAP_ONLY) N(MSG_ID_SYN_SUP) ]
sending packet: from 192.1.3.209[4500] to 192.1.2.23[4500] (XXX bytes)
received packet: from 192.1.2.23[4500] to 192.1.3.209[4500] (XXX bytes)
parsed IKE_AUTH response 1 [ IDr AUTH CPRP(ADDR DNS DNS) SA TSi TSr ]
authentication of '192.1.2.23' with pre-shared key successful
installing new virtual IP 192.0.1.254
IKE_SA client[1] established between 192.1.3.209[192.1.3.209]...192.1.2.23[192.1.2.23]
scheduling rekeying in XXXs
maximum IKE_SA lifetime XXXs
selected proposal: ESP:AES_GCM_16_256/NO_EXT_SEQ
CHILD_SA client{1} established with SPIs SPISPI_i SPISPI_o and TS 192.0.1.254/32 === 192.0.2.0/24
connection 'client' established successfully
road #
 ../../guestbin/ping-once.sh --up -I 192.0.1.254 192.0.2.254
up
road #
 echo done
done
road #
 if [ -f /var/run/pluto/pluto.pid ]; then ipsec _kernel state ; fi
road #
 if [ -f /var/run/pluto/pluto.pid ]; then ipsec _kernel policy ; fi
road #
 if [ -f /var/run/charon.pid -o -f /var/run/strongswan/charon.pid ]; then strongswan status ; fi
Shunted Connections:
Bypass LAN 192.1.3.0/24:  192.1.3.0/24 === 192.1.3.0/24 PASS
Security Associations (1 up, 0 connecting):
      client[1]: ESTABLISHED XXX second ago, 192.1.3.209[192.1.3.209]...192.1.2.23[192.1.2.23]
      client{1}:  INSTALLED, TUNNEL, reqid 1, ESP in UDP SPIs: SPISPI_i SPISPI_o
      client{1}:   192.0.1.254/32 === 192.0.2.0/24
road #
