TCPDUMP moon# 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 ] carol# /etc/init.d/iptables start 2> /dev/null * Caching service dependencies ... [ ok ] * Starting firewall ... [ ok ] carol# ipsec start Starting strongSwan 4.2.17 IPsec [starter]... moon# ipsec start Starting strongSwan 4.2.17 IPsec [starter]... carol# ipsec up home 002 "home" #1: initiating Main Mode 104 "home" #1: STATE_MAIN_I1: initiate 003 "home" #1: ignoring Vendor ID payload [strongSwan 4.2.17] 003 "home" #1: received Vendor ID payload [XAUTH] 003 "home" #1: received Vendor ID payload [Dead Peer Detection] 106 "home" #1: STATE_MAIN_I2: sent MI2, expecting MR2 002 "home" #1: we have a cert and are sending it upon request 108 "home" #1: STATE_MAIN_I3: sent MI3, expecting MR3 002 "home" #1: Peer ID is ID_FQDN: '@moon.strongswan.org' 002 "home" #1: crl not found 002 "home" #1: certificate status unknown 002 "home" #1: ISAKMP SA established 004 "home" #1: STATE_MAIN_I4: ISAKMP SA established 002 "home" #2: initiating Quick Mode RSASIG+ENCRYPT+AUTHENTICATE+PFS+UP {using isakmp#1} 112 "home" #2: STATE_QUICK_I1: initiate 002 "home" #2: sent QI2, IPsec SA established {ESP=>0x8f8e9408 <0x20ec605f AH=>0xfdf606da <0xf5de556c} 004 "home" #2: STATE_QUICK_I2: sent QI2, IPsec SA established {ESP=>0x8f8e9408 <0x20ec605f AH=>0xfdf606da <0xf5de556c} TEST carol# ipsec status | grep 'home.*STATE_QUICK_I2.*IPsec SA established' [YES] 000 #2: "home" STATE_QUICK_I2 (sent QI2, IPsec SA established); EVENT_SA_REPLACE in 921s; newest IPSEC; eroute owner moon# ipsec status | grep 'rw.*STATE_QUICK_R2.*IPsec SA established' [YES] 000 #2: "rw"[1] 192.168.0.100 STATE_QUICK_R2 (IPsec SA established); EVENT_SA_REPLACE in 1109s; newest IPSEC; eroute owner carol# ipsec statusall | grep 'ESP algorithm newest: AES_128-;' [YES] 000 "home": ESP algorithm newest: AES_128-; pfsgroup= moon# ipsec statusall | grep 'ESP algorithm newest: AES_128-;' [YES] 000 "rw"[1]: ESP algorithm newest: AES_128-; pfsgroup= carol# ping -c 1 -s 120 -p deadbeef 192.168.0.1 | grep '128 bytes from 192.168.0.1: icmp_seq=1' [YES] 128 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=3.62 ms carol# ipsec status | grep 'ah\..*ah\..*esp\..*ago.*esp\..*ago.*transport' [YES] 000 #2: "home" ah.fdf606da@192.168.0.1 ah.f5de556c@192.168.0.100 esp.8f8e9408@192.168.0.1 (128 bytes, 1s ago) esp.20ec605f@192.168.0.100 (128 bytes, 1s ago); transport moon# ipsec status | grep 'ah\..*ah\..*esp\..*ago.*esp\..*ago.*transport' [YES] 000 #2: "rw"[1] 192.168.0.100 ah.f5de556c@192.168.0.100 ah.fdf606da@192.168.0.1 esp.20ec605f@192.168.0.100 (128 bytes, 1s ago) esp.8f8e9408@192.168.0.1 (128 bytes, 1s ago); transport moon# killall tcpdump moon# cat /tmp/tcpdump.log | grep 'AH.*ESP' [YES] 14:30:26.514869 IP carol.strongswan.org > moon.strongswan.org: AH(spi=0xfdf606da,seq=0x1): ESP(spi=0x8f8e9408,seq=0x1), length 168 14:30:26.515073 IP moon.strongswan.org > carol.strongswan.org: AH(spi=0xf5de556c,seq=0x1): ESP(spi=0x20ec605f,seq=0x1), length 168 POST-TEST moon# ipsec stop Stopping strongSwan IPsec... carol# ipsec stop Stopping strongSwan IPsec... moon# /etc/init.d/iptables stop 2> /dev/null * Stopping firewall ... [ ok ] carol# /etc/init.d/iptables stop 2> /dev/null * Stopping firewall ... [ ok ]