/testing/guestbin/swan-prep --x509 Preparing X.509 files west # ip route del default west # ip route add default via 192.9.4.1 Error: Nexthop has invalid gateway. west # certutil -D -n east -d sql:/etc/ipsec.d west # cp west-ikev2-oe.conf /etc/ipsec.d/ikev2-oe.conf west # cp policies/* /etc/ipsec.d/policies/ west # # specific /32 to test replacement of /32 oppo-instance with oppo-group west # echo "192.1.2.23/32" >> /etc/ipsec.d/policies/private west # restorecon -R /etc/ipsec.d west # ipsec start Redirecting to: [initsystem] changing /proc/sys/net/core/xfrm_acq_expires from 30 to 10 west # /testing/pluto/bin/wait-until-pluto-started west # ipsec whack --impair suppress-retransmits west # # give OE policies time to load west # sleep 5 west # ip -s xfrm monitor > /tmp/xfrm-monitor.out & [x] PID west # echo "initdone" initdone west # ping -n -c 5 -I 192.1.2.45 192.1.2.23 PING 192.1.2.23 (192.1.2.23) from 192.1.2.45 : 56(84) bytes of data. --- 192.1.2.23 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time XXXX west # # wait on OE retransmits and rekeying west # sleep 5 west # # should show established tunnel and no bare shunts west # ipsec whack --trafficstatus west # ipsec whack --shuntstatus 000 Bare Shunt list: 000 west # # ping should succeed through tunnel west # ping -n -c 2 -I 192.1.2.45 192.1.2.23 PING 192.1.2.23 (192.1.2.23) from 192.1.2.45 : 56(84) bytes of data. --- 192.1.2.23 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time XXXX west # ipsec whack --trafficstatus west # echo "waiting on east to send delete for this IPsec SA" waiting on east to send delete for this IPsec SA west # # confirm received delete was processed - should show no tunnel west # ipsec whack --trafficstatus west # # let the old acquire expire so it won't interfere with our new trigger west # sleep 5 west # # try triggering again, ondemand policy should re-trigger OE west # ip xfrm state west # ip xfrm pol src 192.1.2.45/32 dst 192.1.2.23/32 dir out priority 1564639 ptype main tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid 0 mode transport src 192.1.2.253/32 dst 192.1.2.45/32 dir fwd priority 1564639 ptype main src 192.1.2.253/32 dst 192.1.2.45/32 dir in priority 1564639 ptype main src 192.1.2.45/32 dst 192.1.2.253/32 dir out priority 1564639 ptype main src 192.1.3.253/32 dst 192.1.2.45/32 dir fwd priority 1564639 ptype main src 192.1.3.253/32 dst 192.1.2.45/32 dir in priority 1564639 ptype main src 192.1.2.45/32 dst 192.1.3.253/32 dir out priority 1564639 ptype main src 192.1.3.254/32 dst 192.1.2.45/32 dir fwd priority 1564639 ptype main src 192.1.3.254/32 dst 192.1.2.45/32 dir in priority 1564639 ptype main src 192.1.2.45/32 dst 192.1.3.254/32 dir out priority 1564639 ptype main src 192.1.2.254/32 dst 192.1.2.45/32 dir fwd priority 1564639 ptype main src 192.1.2.254/32 dst 192.1.2.45/32 dir in priority 1564639 ptype main src 192.1.2.45/32 dst 192.1.2.254/32 dir out priority 1564639 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main west # ping -n -c 1 -I 192.1.2.45 192.1.2.23 PING 192.1.2.23 (192.1.2.23) from 192.1.2.45 : 56(84) bytes of data. --- 192.1.2.23 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time XXXX west # # wait on OE to re-establish IPsec SA west # sleep 5 west # ip xfrm state west # ip xfrm pol src 192.1.2.45/32 dst 192.1.2.23/32 dir out priority 1564639 ptype main tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid 0 mode transport src 192.1.2.253/32 dst 192.1.2.45/32 dir fwd priority 1564639 ptype main src 192.1.2.253/32 dst 192.1.2.45/32 dir in priority 1564639 ptype main src 192.1.2.45/32 dst 192.1.2.253/32 dir out priority 1564639 ptype main src 192.1.3.253/32 dst 192.1.2.45/32 dir fwd priority 1564639 ptype main src 192.1.3.253/32 dst 192.1.2.45/32 dir in priority 1564639 ptype main src 192.1.2.45/32 dst 192.1.3.253/32 dir out priority 1564639 ptype main src 192.1.3.254/32 dst 192.1.2.45/32 dir fwd priority 1564639 ptype main src 192.1.3.254/32 dst 192.1.2.45/32 dir in priority 1564639 ptype main src 192.1.2.45/32 dst 192.1.3.254/32 dir out priority 1564639 ptype main src 192.1.2.254/32 dst 192.1.2.45/32 dir fwd priority 1564639 ptype main src 192.1.2.254/32 dst 192.1.2.45/32 dir in priority 1564639 ptype main src 192.1.2.45/32 dst 192.1.2.254/32 dir out priority 1564639 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket out priority 0 ptype main src 0.0.0.0/0 dst 0.0.0.0/0 socket in priority 0 ptype main west # # should show established tunnel and no bare shunts west # ipsec whack --trafficstatus west # ipsec whack --shuntstatus 000 Bare Shunt list: 000 000 192.1.2.45/32:8 -1-> 192.1.2.23/32:0 => %hold 0 %acquire-netlink west # # ping should succeed through tunnel west # ping -n -c 2 -I 192.1.2.45 192.1.2.23 PING 192.1.2.23 (192.1.2.23) from 192.1.2.45 : 56(84) bytes of data. --- 192.1.2.23 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time XXXX west # ipsec whack --trafficstatus west # # both ends should show a tunnel west # ipsec whack --trafficstatus west # west # ../bin/check-for-core.sh west # if [ -f /sbin/ausearch ]; then ausearch -r -m avc -ts recent ; fi