/testing/guestbin/swan-prep
road #
 echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
road #
 ipsec start
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec whack --impair suppress-retransmits
road #
 ipsec auto --add road
002 "road": added IKEv1 connection
road #
 echo "initdone"
initdone
road #
 ipsec auto --up road
1v2 "road" #1: initiating IKEv2 connection
1v2 "road" #1: sent IKE_SA_INIT request
1v2 "road" #1: sent IKE_AUTH request {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=MODP2048}
003 "road" #2: authenticated using authby=secret and peer ID_FQDN '@east'
004 "road" #2: established Child SA; IPsec tunnel [192.1.3.209-192.1.3.209:0-65535 0] -> [192.1.2.23-192.1.2.23:0-65535 0] {ESP=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE NATOA=none NATD=none DPD=passive}
road #
 # ip rule add prio 100 to 192.1.2.23/32 not fwmark 1/0xffffffff lookup 50
road #
 # sleep 2
road #
 # ip route add table 50 192.1.2.23/32 dev ipsec1 src 192.1.3.209
road #
 ping -n -q -w 4 -c 4 192.1.2.23
PING 192.1.2.23 (192.1.2.23) 56(84) bytes of data.
--- 192.1.2.23 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time XXXX
rtt min/avg/max/mdev = 0.XXX/0.XXX/0.XXX/0.XXX ms
road #
 ip -s link show ipsec1
X: ipsec1@eth0: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
    RX: bytes  packets  errors  dropped overrun mcast   
    336        4        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    336        4        0       0       0       0       
road #
 ip rule show
0:	from all lookup local
100:	from all to 192.1.2.23 fwmark 0x1 lookup 50
32766:	from all lookup main
32767:	from all lookup default
road #
 ip route show table 50
192.1.2.23 via 192.1.3.254 dev eth0
road #
 ip route
default via 192.1.3.254 dev eth0
192.1.2.23 dev ipsec1 scope link
192.1.3.0/24 dev eth0 proto kernel scope link src 192.1.3.209
road #
 echo done
done
road #
 ipsec whack --trafficstatus
006 #2: "road", type=ESP, add_time=1234567890, inBytes=336, outBytes=336, id='@east'
road #
 
