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# rm /etc/ipsec.d/cacerts/* sun# rm /etc/ipsec.d/cacerts/* moon# ipsec start Starting strongSwan 4.2.10 IPsec [starter]... sun# ipsec start Starting strongSwan 4.2.10 IPsec [starter]... moon# sleep 2 moon# ipsec up net-net 002 "net-net" #1: initiating Main Mode 104 "net-net" #1: STATE_MAIN_I1: initiate 003 "net-net" #1: ignoring Vendor ID payload [strongSwan 4.2.10] 003 "net-net" #1: received Vendor ID payload [XAUTH] 003 "net-net" #1: received Vendor ID payload [Dead Peer Detection] 106 "net-net" #1: STATE_MAIN_I2: sent MI2, expecting MR2 108 "net-net" #1: STATE_MAIN_I3: sent MI3, expecting MR3 002 "net-net" #1: Peer ID is ID_FQDN: '@sun.strongswan.org' 002 "net-net" #1: ISAKMP SA established 004 "net-net" #1: STATE_MAIN_I4: ISAKMP SA established 002 "net-net" #2: initiating Quick Mode PSK+ENCRYPT+TUNNEL+PFS+UP {using isakmp#1} 112 "net-net" #2: STATE_QUICK_I1: initiate 002 "net-net" #2: sent QI2, IPsec SA established {ESP=>0xd9c43a7c <0xe8861a30} 004 "net-net" #2: STATE_QUICK_I2: sent QI2, IPsec SA established {ESP=>0xd9c43a7c <0xe8861a30} TEST moon# ipsec status | grep 'net-net.*STATE_QUICK_I2.*IPsec SA established' [YES] 000 #2: "net-net" STATE_QUICK_I2 (sent QI2, IPsec SA established); EVENT_SA_REPLACE in 860s; newest IPSEC; eroute owner sun# ipsec status | grep 'net-net.*STATE_QUICK_R2.*IPsec SA established' [YES] 000 #2: "net-net" STATE_QUICK_R2 (IPsec SA established); EVENT_SA_REPLACE in 1110s; newest IPSEC; eroute owner 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=2.50 ms sun# killall tcpdump sun# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > sun.strongswan.org: ESP' [YES] 09:58:05.515399 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xd9c43a7c,seq=0x1), length 132 sun# cat /tmp/tcpdump.log | grep 'IP sun.strongswan.org > moon.strongswan.org: ESP' [YES] 09:58:05.516412 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xe8861a30,seq=0x1), 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 ]