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 ] moon# ipsec start Starting strongSwan 4.3.6 IPsec [starter]... carol# ipsec start Starting strongSwan 4.3.6 IPsec [starter]... carol# sleep 2 carol# ipsec up home-icmp 002 "home-icmp" #1: initiating Main Mode 104 "home-icmp" #1: STATE_MAIN_I1: initiate 003 "home-icmp" #1: ignoring Vendor ID payload [strongSwan] 003 "home-icmp" #1: received Vendor ID payload [XAUTH] 003 "home-icmp" #1: received Vendor ID payload [Dead Peer Detection] 106 "home-icmp" #1: STATE_MAIN_I2: sent MI2, expecting MR2 002 "home-icmp" #1: we have a cert and are sending it upon request 108 "home-icmp" #1: STATE_MAIN_I3: sent MI3, expecting MR3 002 "home-icmp" #1: Peer ID is ID_FQDN: 'moon.strongswan.org' 002 "home-icmp" #1: crl not found 002 "home-icmp" #1: certificate status unknown 002 "home-icmp" #1: ISAKMP SA established 004 "home-icmp" #1: STATE_MAIN_I4: ISAKMP SA established 002 "home-icmp" #2: initiating Quick Mode PUBKEY+ENCRYPT+TUNNEL+PFS+UP {using isakmp#1} 112 "home-icmp" #2: STATE_QUICK_I1: initiate 002 "home-icmp" #2: sent QI2, IPsec SA established {ESP=>0x93f6adf3 <0xe18edd82} 004 "home-icmp" #2: STATE_QUICK_I2: sent QI2, IPsec SA established {ESP=>0x93f6adf3 <0xe18edd82} carol# ipsec up home-ssh 002 "home-ssh" #3: initiating Quick Mode PUBKEY+ENCRYPT+TUNNEL+PFS+UP {using isakmp#1} 112 "home-ssh" #3: STATE_QUICK_I1: initiate 002 "home-ssh" #3: sent QI2, IPsec SA established {ESP=>0x5092ebea <0x73bcbe40} 004 "home-ssh" #3: STATE_QUICK_I2: sent QI2, IPsec SA established {ESP=>0x5092ebea <0x73bcbe40} TEST carol# ipsec status | grep 'home.*STATE_QUICK_I2.*IPsec SA established' [YES] 000 #2: "home-icmp" STATE_QUICK_I2 (sent QI2, IPsec SA established); EVENT_SA_REPLACE in 947s; newest IPSEC; eroute owner 000 #3: "home-ssh" STATE_QUICK_I2 (sent QI2, IPsec SA established); EVENT_SA_REPLACE in 880s; newest IPSEC; eroute owner moon# ipsec status | grep 'rw.*STATE_QUICK_R2.*IPsec SA established' [YES] 000 #2: "rw-icmp"[1] 192.168.0.100 STATE_QUICK_R2 (IPsec SA established); EVENT_SA_REPLACE in 1107s; newest IPSEC; eroute owner 000 #3: "rw-ssh"[2] 192.168.0.100 STATE_QUICK_R2 (IPsec SA established); EVENT_SA_REPLACE in 1109s; newest IPSEC; eroute owner carol# ping -c 1 10.1.0.10 | grep '64 bytes from 10.1.0.10: icmp_seq=1' [YES] 64 bytes from 10.1.0.10: icmp_seq=1 ttl=63 time=1.90 ms carol# ping -c 1 10.1.0.1 | grep '64 bytes from 10.1.0.1: icmp_seq=1' [YES] 64 bytes from 10.1.0.1: icmp_seq=1 ttl=64 time=0.349 ms carol# ssh -o ConnectTimeout=5 10.1.0.10 hostname | grep 'alice' [YES] alice moon# killall tcpdump moon# cat /tmp/tcpdump.log | grep 'IP carol.strongswan.org > moon.strongswan.org: ESP' [YES] 23:38:24.385017 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x93f6adf3,seq=0x1), length 132 23:38:24.537613 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x93f6adf3,seq=0x2), length 132 23:38:24.754856 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x1), length 100 23:38:24.759436 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x2), length 100 23:38:24.786428 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x3), length 100 23:38:24.788099 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x4), length 116 23:38:24.789098 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x5), length 884 23:38:24.797752 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x6), length 116 23:38:24.805467 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x7), length 244 23:38:24.814899 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x8), length 116 23:38:24.829119 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x9), length 148 23:38:24.829620 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0xa), length 164 23:38:24.845855 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0xb), length 484 23:38:24.859358 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0xc), length 228 23:38:24.864490 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0xd), length 164 23:38:24.888356 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0xe), length 100 23:38:24.890546 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0xf), length 100 23:38:24.890550 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x10), length 132 23:38:24.890554 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x11), length 100 23:38:24.895799 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0x5092ebea,seq=0x12), length 100 moon# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > carol.strongswan.org: ESP' [YES] 23:38:24.386643 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xe18edd82,seq=0x1), length 132 23:38:24.537733 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xe18edd82,seq=0x2), length 132 23:38:24.755440 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x1), length 100 23:38:24.786262 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x2), length 116 23:38:24.788952 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x3), length 100 23:38:24.789228 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x4), length 100 23:38:24.796774 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x5), length 884 23:38:24.802475 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x6), length 244 23:38:24.811837 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x7), length 564 23:38:24.828962 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x8), length 100 23:38:24.829275 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x9), length 100 23:38:24.829327 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0xa), length 148 23:38:24.833262 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0xb), length 164 23:38:24.858443 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0xc), length 132 23:38:24.864191 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0xd), length 148 23:38:24.866942 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0xe), length 180 23:38:24.888077 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0xf), length 148 23:38:24.889039 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x10), length 132 23:38:24.889067 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x11), length 260 23:38:24.895685 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0x73bcbe40,seq=0x12), length 100 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 ]