/testing/guestbin/swan-prep east # echo 3 > /proc/sys/net/core/xfrm_acq_expires east # # build install se module east # ../../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 east # # get pluto going east # ipsec start Redirecting to: [initsystem] east # ../../guestbin/wait-until-pluto-started east # ipsec auto --add labeled "labeled": added IKEv2 connection east # echo "initdone" initdone east # # There should be 2x2 IPsec SA states (in/out for ping and ssh), all east # # with same reqid. east # ../../guestbin/ipsec-kernel-state.sh src 192.1.2.45 dst 192.1.2.23 proto esp spi 0xSPISPI reqid REQID mode transport replay-window 0 flag esn aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128 lastused YYYY-MM-DD HH:MM:SS anti-replay esn context: seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX replay_window 128, bitmap-length 4 00000000 00000000 00000000 XXXXXXXX sel src 192.1.2.45/32 dst 192.1.2.23/32 security context system_u:system_r:sshd_t:s0-s0:c0.c1023 src 192.1.2.23 dst 192.1.2.45 proto esp spi 0xSPISPI reqid REQID mode transport replay-window 0 flag esn aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128 lastused YYYY-MM-DD HH:MM:SS anti-replay esn context: seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX replay_window 128, bitmap-length 4 00000000 00000000 00000000 XXXXXXXX sel src 192.1.2.23/32 dst 192.1.2.45/32 security context system_u:system_r:sshd_t:s0-s0:c0.c1023 src 192.1.2.45 dst 192.1.2.23 proto esp spi 0xSPISPI reqid REQID mode transport replay-window 0 flag esn aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128 lastused YYYY-MM-DD HH:MM:SS anti-replay esn context: seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX replay_window 128, bitmap-length 4 00000000 00000000 00000000 XXXXXXXX sel src 192.1.2.45/32 dst 192.1.2.23/32 security context system_u:system_r:ping_t:s0:c1.c256 src 192.1.2.23 dst 192.1.2.45 proto esp spi 0xSPISPI reqid REQID mode transport replay-window 0 flag esn aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128 lastused YYYY-MM-DD HH:MM:SS anti-replay esn context: seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX replay_window 128, bitmap-length 4 00000000 00000000 00000000 XXXXXXXX sel src 192.1.2.23/32 dst 192.1.2.45/32 security context system_u:system_r:ping_t:s0:c1.c256 east # # And there should be one set of tunnel policies using the configured east # # ipsec_spd_t label, and no outgoing %trap policy east # ../../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 out 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 in priority PRIORITY ptype main tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid REQID mode transport east # # The IKE SA should be associated with the template connection east # ipsec showstates #1: "labeled"[1] 192.1.2.45:500 ESTABLISHED_IKE_SA (established IKE SA); REKEY in XXs; REPLACE in XXs; idle; #3: "labeled"[1] 192.1.2.45:500 ESTABLISHED_IKE_SA (established IKE SA); REKEY in XXs; REPLACE in XXs; newest; idle; #2: "labeled"[1][1] 192.1.2.45:500 ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; REPLACE in XXs; newest; IKE SA #1; idle; #2: "labeled"[1][1] 192.1.2.45 esp.ESPSPIi@192.1.2.45 esp.ESPSPIi@192.1.2.23 Traffic: ESPin=64B ESPout=64B ESPmax=2^63B #4: "labeled"[1][2] 192.1.2.45:500 ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; REPLACE in XXs; newest; IKE SA #3; idle; #4: "labeled"[1][2] 192.1.2.45 esp.ESPSPIi@192.1.2.45 esp.ESPSPIi@192.1.2.23 Traffic: ESPin=269B ESPout=257B ESPmax=2^63B east #