/testing/guestbin/swan-prep
road #
 echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
road #
 ipsec start
Redirecting to: [initsystem]
road #
 /testing/pluto/bin/wait-until-pluto-started
road #
 ipsec auto --add road
002 "road": added IKEv1 connection
road #
 ../bin/tcpdump.sh --start -i eth0
road #
 echo "initdone"
initdone
road #
 ipsec auto --up road
002 "road" #1: initiating IKEv1 Main Mode connection
1v1 "road" #1: sent Main Mode request
1v1 "road" #1: sent Main Mode I2
1v1 "road" #1: sent Main Mode I3
002 "road" #1: Peer ID is ID_FQDN: '@east'
004 "road" #1: IKE SA established {auth=PRESHARED_KEY cipher=AES_CBC_256 integ=HMAC_SHA2_256 group=MODP2048}
002 "road" #2: initiating Quick Mode IKEv1+PSK+ENCRYPT+TUNNEL+PFS+UP+IKE_FRAG_ALLOW+ESN_NO
1v1 "road" #2: sent Quick Mode request
004 "road" #2: IPsec SA established tunnel mode {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 NATOA=none NATD=none DPD=passive}
road #
 # disable ping. tcpdump will be messy, tcpdump is more important here.
road #
 # ping -w 4 -c 4 192.1.2.23
road #
 ip -s link show ipsec1
X: ipsec1@eth0: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
    RX: bytes  packets  errors  dropped overrun mcast   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    0          0        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 #
 ../bin/xfrmcheck.sh
road #
 # traffic should be 0 bytes in both directions
road #
 ipsec whack --trafficstatus
006 #2: "road", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, id='@east'
road #
 ../bin/tcpdump.sh --stop
reading from file /tmp/road-ikev1-xfrmi-02-tcpdump.pcap, link-type EN10MB (Ethernet)
IP 192.1.3.209.isakmp > 192.1.2.23.isakmp: isakmp: phase 1 I ident
IP 192.1.2.23.isakmp > 192.1.3.209.isakmp: isakmp: phase 1 R ident
IP 192.1.3.209.isakmp > 192.1.2.23.isakmp: isakmp: phase 1 I ident
IP 192.1.2.23.isakmp > 192.1.3.209.isakmp: isakmp: phase 1 R ident
IP 192.1.3.209.isakmp > 192.1.2.23.isakmp: isakmp: phase 1 I ident[E]
IP 192.1.2.23.isakmp > 192.1.3.209.isakmp: isakmp: phase 1 R ident[E]
IP 192.1.3.209.isakmp > 192.1.2.23.isakmp: isakmp: phase 2/others I oakley-quick[E]
IP 192.1.2.23.isakmp > 192.1.3.209.isakmp: isakmp: phase 2/others R oakley-quick[E]
IP 192.1.3.209.isakmp > 192.1.2.23.isakmp: isakmp: phase 2/others I oakley-quick[E]
road #
 ../bin/check-for-core.sh
road #
 if [ -f /sbin/ausearch ]; then ausearch -r -m avc -ts recent ; fi
road #
 
