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.2.17 IPsec [starter]... sun# ipsec start Starting strongSwan 4.2.17 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=3 ttl=62 time=1.19 ms 64 bytes from 10.2.0.10: icmp_seq=4 ttl=62 time=1.01 ms 64 bytes from 10.2.0.10: icmp_seq=5 ttl=62 time=1.01 ms 64 bytes from 10.2.0.10: icmp_seq=6 ttl=62 time=0.873 ms 64 bytes from 10.2.0.10: icmp_seq=7 ttl=62 time=0.953 ms 64 bytes from 10.2.0.10: icmp_seq=8 ttl=62 time=0.884 ms 64 bytes from 10.2.0.10: icmp_seq=9 ttl=62 time=0.989 ms 64 bytes from 10.2.0.10: icmp_seq=10 ttl=62 time=1.23 ms --- 10.2.0.10 ping statistics --- 10 packets transmitted, 8 received, 20% packet loss, time 9076ms rtt min/avg/max/mdev = 0.873/1.019/1.239/0.130 ms TEST moon# cat /var/log/daemon.log | grep 'creating acquire job' [YES] Jul 20 17:05:57 moon charon: 04[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: c02247f6_i cf308b22_o sun# ipsec statusall | grep 'net-net.*INSTALLED' [YES] net-net{1}: INSTALLED, TUNNEL, ESP SPIs: cf308b22_i c02247f6_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=1.20 ms sun# killall tcpdump sun# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > sun.strongswan.org: ESP' [YES] 17:05:58.483640 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0x1), length 132 17:05:59.472045 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0x2), length 132 17:06:00.481927 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0x3), length 132 17:06:01.491583 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0x4), length 132 17:06:02.501049 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0x5), length 132 17:06:03.512009 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0x6), length 132 17:06:04.520893 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0x7), length 132 17:06:05.530884 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0x8), length 132 17:06:06.540696 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0x9), length 132 17:06:09.180192 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xcf308b22,seq=0xa), length 132 sun# cat /tmp/tcpdump.log | grep 'IP sun.strongswan.org > moon.strongswan.org: ESP' [YES] 17:05:58.487682 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,seq=0x1), length 132 17:05:59.472600 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,seq=0x2), length 132 17:06:00.482301 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,seq=0x3), length 132 17:06:01.491915 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,seq=0x4), length 132 17:06:02.501356 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,seq=0x5), length 132 17:06:03.512352 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,seq=0x6), length 132 17:06:04.521217 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,seq=0x7), length 132 17:06:05.531254 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,seq=0x8), length 132 17:06:06.541008 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,seq=0x9), length 132 17:06:09.180741 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc02247f6,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 ]