/testing/guestbin/swan-prep --hostkeys Creating NSS database containing host keys west # echo 3 > /proc/sys/net/core/xfrm_acq_expires west # # build install se module (west only) west # ../../guestbin/semodule.sh ipsecspd-full-perm.te Compiling targeted ipsecspd-full-perm module Creating targeted ipsecspd-full-perm.pp policy package rm tmp/ipsecspd-full-perm.mod.fc tmp/ipsecspd-full-perm.mod ipsecspd-full-perm.pp installed west # # start pluto west # ipsec start Redirecting to: [initsystem] west # ../../guestbin/wait-until-pluto-started west # ipsec auto --add labeled "labeled": added IKEv2 connection west # echo "initdone" initdone west # # should establish IKE SA and install two labels west # ipsec auto --up labeled "labeled"[1] 192.1.2.23 #1: initiating IKEv2 connection to 192.1.2.23 using UDP "labeled"[1] 192.1.2.23 #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500 "labeled"[1] 192.1.2.23 #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 "labeled"[1] 192.1.2.23 #1: omitting CHILD SA payloads "labeled"[1] 192.1.2.23 #1: sent IKE_AUTH request to 192.1.2.23:UDP/500 "labeled"[1] 192.1.2.23 #1: initiator established IKE SA; authenticated peer using preloaded certificate '@east' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature west # ../../guestbin/ipsec-kernel-state.sh west # ../../guestbin/ipsec-kernel-policy.sh src 192.1.2.23/32 dst 192.1.2.45/32 security context system_u:object_r:ipsec_spd_t:s0 dir in priority PRIORITY ptype main tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid REQID mode transport src 192.1.2.45/32 dst 192.1.2.23/32 security context system_u:object_r:ipsec_spd_t:s0 dir out priority PRIORITY ptype main tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid REQID mode transport west # # trigger traffic using the predefined ping_t context; won't work west # ../../guestbin/ping-once.sh --runcon "system_u:system_r:ping_t:s0:c1.c256" --forget -I 192.1.2.45 192.1.2.23 fired and forgotten west # ../../guestbin/wait-for-pluto.sh 'TS_UNACCEPTABLE' "labeled"[1][1] 192.1.2.23 #2: CREATE_CHILD_SA failed with error notification TS_UNACCEPTABLE west # # there should be 0 tunnels - child rejected west # ipsec trafficstatus west # # there should be no bare shunts west # ipsec shuntstatus Bare Shunt list: west # # let larval state expire west # ../../guestbin/wait-for.sh --no-match ' spi 0x00000000 ' -- ../../guestbin/ipsec-kernel-state.sh west # echo done done west #