/testing/guestbin/swan-prep
road #
 ipsec start
Redirecting to: systemctl start ipsec.service
road #
 /testing/pluto/bin/wait-until-pluto-started
road #
 ipsec whack --impair retransmits
road #
 echo "initdone"
initdone
road #
 sleep 4
road #
 ip -4 route
default via 192.1.3.254 dev eth0 
192.1.2.23 dev eth0  scope link  src 192.0.2.1 
192.1.3.0/24 dev eth0 proto kernel scope link src 192.1.3.209 
road #
 # ipsec will configure 192.0.2.1 on eth0
road #
 ip addr show  dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default
    link/ether 12:00:00:ab:cd:02 brd ff:ff:ff:ff:ff:ff
    inet 192.1.3.209/24 brd 192.1.3.255 scope global eth0
       valid_lft forever preferred_lft forever
road #
 ping -n -c 2 192.1.2.23
PING 192.1.2.23 (192.1.2.23) 56(84) bytes of data.
--- 192.1.2.23 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time XXXX
road #
 ipsec whack --trafficstatus
006 #2: "westnet-eastnet-ipv4-psk-ikev2"[1] 192.1.2.23, type=ESP, add_time=1234567890, inBytes=0, outBytes=168, id='@east', lease=192.0.2.1/32
road #
 ipsec auto --down westnet-eastnet-ipv4-psk-ikev2
002 "westnet-eastnet-ipv4-psk-ikev2"[1] 192.1.2.23: terminating SAs using this connection
002 "westnet-eastnet-ipv4-psk-ikev2" #2: deleting state (STATE_V2_IPSEC_I) and sending notification
005 "westnet-eastnet-ipv4-psk-ikev2" #2: ESP traffic information: in=168B out=0B
002 "westnet-eastnet-ipv4-psk-ikev2" #2: down-client output: restoring resolvconf
002 "westnet-eastnet-ipv4-psk-ikev2" #1: deleting state (STATE_PARENT_I3) and sending notification
002 "westnet-eastnet-ipv4-psk-ikev2"[1] 192.1.2.23: deleting connection "westnet-eastnet-ipv4-psk-ikev2"[1] 192.1.2.23 instance with peer 192.1.2.23
road #
 #check if the address, 192.0.2.1, is removed
road #
 ip addr show  dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default
    link/ether 12:00:00:ab:cd:02 brd ff:ff:ff:ff:ff:ff
    inet 192.1.3.209/24 brd 192.1.3.255 scope global eth0
       valid_lft forever preferred_lft forever
road #
 echo done
done
road #
road #
 ../bin/check-for-core.sh
road #
 if [ -f /sbin/ausearch ]; then ausearch -r -m avc -ts recent ; fi

