TCPDUMP sun# tcpdump -i eth0 not port ssh and not port domain and not arp > /tmp/tcpdump.log 2>&1 & PRE-TEST moon# /etc/init.d/iptables start 2> /dev/null * Caching service dependencies ... [ ok ] * Starting firewall ... [ ok ] sun# /etc/init.d/iptables start 2> /dev/null * Caching service dependencies ... [ ok ] * Starting firewall ... [ ok ] moon# ipsec start Starting strongSwan 4.3.6 IPsec [starter]... sun# ipsec start Starting strongSwan 4.3.6 IPsec [starter]... moon# sleep 2 alice# ping -c 10 10.2.0.10 PING 10.2.0.10 (10.2.0.10) 56(84) bytes of data. 64 bytes from 10.2.0.10: icmp_seq=2 ttl=62 time=4.86 ms 64 bytes from 10.2.0.10: icmp_seq=3 ttl=62 time=1.09 ms 64 bytes from 10.2.0.10: icmp_seq=4 ttl=62 time=1.32 ms 64 bytes from 10.2.0.10: icmp_seq=5 ttl=62 time=1.20 ms 64 bytes from 10.2.0.10: icmp_seq=6 ttl=62 time=0.995 ms 64 bytes from 10.2.0.10: icmp_seq=7 ttl=62 time=0.939 ms 64 bytes from 10.2.0.10: icmp_seq=8 ttl=62 time=1.29 ms 64 bytes from 10.2.0.10: icmp_seq=9 ttl=62 time=1.21 ms 64 bytes from 10.2.0.10: icmp_seq=10 ttl=62 time=1.33 ms --- 10.2.0.10 ping statistics --- 10 packets transmitted, 9 received, 10% packet loss, time 9042ms rtt min/avg/max/mdev = 0.939/1.585/4.865/1.167 ms TEST moon# cat /var/log/daemon.log | grep 'creating acquire job' [YES] Feb 28 01:17:44 moon charon: 06[KNL] creating acquire job for policy 192.168.0.1/32 === 192.168.0.2/32 with reqid {1} moon# ipsec statusall | grep 'net-net.*INSTALLED' [YES] net-net{1}: INSTALLED, TUNNEL, ESP SPIs: c144458c_i c8c84941_o sun# ipsec statusall | grep 'net-net.*INSTALLED' [YES] net-net{1}: INSTALLED, TUNNEL, ESP SPIs: c8c84941_i c144458c_o alice# ping -c 1 10.2.0.10 | grep '64 bytes from 10.2.0.10: icmp_seq=1' [YES] 64 bytes from 10.2.0.10: icmp_seq=1 ttl=62 time=0.794 ms sun# killall tcpdump sun# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > sun.strongswan.org: ESP' [YES] 01:17:44.938598 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0x1), length 132 01:17:45.947855 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0x2), length 132 01:17:46.957127 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0x3), length 132 01:17:47.958217 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0x4), length 132 01:17:48.959509 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0x5), length 132 01:17:49.968428 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0x6), length 132 01:17:50.978266 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0x7), length 132 01:17:51.979644 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0x8), length 132 01:17:52.980854 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0x9), length 132 01:17:54.753704 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc8c84941,seq=0xa), length 132 sun# cat /tmp/tcpdump.log | grep 'IP sun.strongswan.org > moon.strongswan.org: ESP' [YES] 01:17:44.939278 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0x1), length 132 01:17:45.948392 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0x2), length 132 01:17:46.957644 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0x3), length 132 01:17:47.958717 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0x4), length 132 01:17:48.959840 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0x5), length 132 01:17:49.968751 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0x6), length 132 01:17:50.978799 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0x7), length 132 01:17:51.980157 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0x8), length 132 01:17:52.981349 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0x9), length 132 01:17:54.753959 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc144458c,seq=0xa), length 132 POST-TEST moon# ipsec stop Stopping strongSwan IPsec... sun# ipsec stop Stopping strongSwan IPsec... moon# /etc/init.d/iptables stop 2> /dev/null * Stopping firewall ... [ ok ] sun# /etc/init.d/iptables stop 2> /dev/null * Stopping firewall ... [ ok ]