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=1.14 ms 64 bytes from 10.2.0.10: icmp_seq=3 ttl=62 time=1.00 ms 64 bytes from 10.2.0.10: icmp_seq=4 ttl=62 time=0.923 ms 64 bytes from 10.2.0.10: icmp_seq=5 ttl=62 time=0.902 ms 64 bytes from 10.2.0.10: icmp_seq=6 ttl=62 time=0.921 ms 64 bytes from 10.2.0.10: icmp_seq=7 ttl=62 time=0.884 ms 64 bytes from 10.2.0.10: icmp_seq=8 ttl=62 time=0.911 ms 64 bytes from 10.2.0.10: icmp_seq=9 ttl=62 time=1.00 ms 64 bytes from 10.2.0.10: icmp_seq=10 ttl=62 time=1.00 ms --- 10.2.0.10 ping statistics --- 10 packets transmitted, 9 received, 10% packet loss, time 9058ms rtt min/avg/max/mdev = 0.884/0.966/1.146/0.083 ms TEST moon# cat /var/log/daemon.log | grep 'creating acquire job' [YES] Feb 28 00:35:01 moon charon: 06[KNL] creating acquire job for policy 10.1.0.10/32[icmp/8] === 10.2.0.10/32[icmp] with reqid {1} moon# ipsec statusall | grep 'net-net.*INSTALLED' [YES] net-net{1}: INSTALLED, TUNNEL, ESP SPIs: cd9d458f_i c739b582_o sun# ipsec statusall | grep 'net-net.*INSTALLED' [YES] net-net{1}: INSTALLED, TUNNEL, ESP SPIs: c739b582_i cd9d458f_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.603 ms sun# killall tcpdump sun# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > sun.strongswan.org: ESP' [YES] 00:35:02.487899 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0x1), length 132 00:35:03.490030 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0x2), length 132 00:35:04.494075 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0x3), length 132 00:35:05.504185 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0x4), length 132 00:35:06.514670 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0x5), length 132 00:35:07.522471 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0x6), length 132 00:35:08.531399 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0x7), length 132 00:35:09.532518 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0x8), length 132 00:35:10.538211 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0x9), length 132 00:35:12.230420 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc739b582,seq=0xa), length 132 sun# cat /tmp/tcpdump.log | grep 'IP sun.strongswan.org > moon.strongswan.org: ESP' [YES] 00:35:02.488319 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,seq=0x1), length 132 00:35:03.490367 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,seq=0x2), length 132 00:35:04.494393 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,seq=0x3), length 132 00:35:05.504513 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,seq=0x4), length 132 00:35:06.514974 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,seq=0x5), length 132 00:35:07.522779 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,seq=0x6), length 132 00:35:08.531710 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,seq=0x7), length 132 00:35:09.532822 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,seq=0x8), length 132 00:35:10.538509 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,seq=0x9), length 132 00:35:12.230604 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcd9d458f,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 ]