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=2 ttl=62 time=4.29 ms 64 bytes from 10.2.0.10: icmp_seq=3 ttl=62 time=0.889 ms 64 bytes from 10.2.0.10: icmp_seq=4 ttl=62 time=0.919 ms 64 bytes from 10.2.0.10: icmp_seq=5 ttl=62 time=0.845 ms 64 bytes from 10.2.0.10: icmp_seq=6 ttl=62 time=0.919 ms 64 bytes from 10.2.0.10: icmp_seq=7 ttl=62 time=0.951 ms 64 bytes from 10.2.0.10: icmp_seq=8 ttl=62 time=0.971 ms 64 bytes from 10.2.0.10: icmp_seq=9 ttl=62 time=1.05 ms 64 bytes from 10.2.0.10: icmp_seq=10 ttl=62 time=1.25 ms --- 10.2.0.10 ping statistics --- 10 packets transmitted, 9 received, 10% packet loss, time 9067ms rtt min/avg/max/mdev = 0.845/1.342/4.292/1.049 ms TEST moon# cat /var/log/daemon.log | grep 'creating acquire job' [YES] Jul 20 16:20:41 moon charon: 04[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: c56e2f1d_i c42286a6_o sun# ipsec statusall | grep 'net-net.*INSTALLED' [YES] net-net{1}: INSTALLED, TUNNEL, ESP SPIs: c42286a6_i c56e2f1d_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.591 ms sun# killall tcpdump sun# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > sun.strongswan.org: ESP' [YES] 16:20:42.423438 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0x1), length 132 16:20:43.430968 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0x2), length 132 16:20:44.431915 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0x3), length 132 16:20:45.441475 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0x4), length 132 16:20:46.450144 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0x5), length 132 16:20:47.460185 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0x6), length 132 16:20:48.469106 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0x7), length 132 16:20:49.478998 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0x8), length 132 16:20:50.488344 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0x9), length 132 16:20:52.122454 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc42286a6,seq=0xa), length 132 sun# cat /tmp/tcpdump.log | grep 'IP sun.strongswan.org > moon.strongswan.org: ESP' [YES] 16:20:42.427030 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,seq=0x1), length 132 16:20:43.431292 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,seq=0x2), length 132 16:20:44.432245 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,seq=0x3), length 132 16:20:45.441787 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,seq=0x4), length 132 16:20:46.450466 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,seq=0x5), length 132 16:20:47.460482 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,seq=0x6), length 132 16:20:48.469463 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,seq=0x7), length 132 16:20:49.479351 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,seq=0x8), length 132 16:20:50.488816 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,seq=0x9), length 132 16:20:52.122676 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc56e2f1d,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 ]