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.2.17 IPsec [starter]... carol# ipsec start Starting strongSwan 4.2.17 IPsec [starter]... carol# sleep 2 carol# ipsec up home-icmp initiating IKE_SA home-icmp[1] to 192.168.0.1 generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ] sending packet: from 192.168.0.100[500] to 192.168.0.1[500] received packet: from 192.168.0.1[500] to 192.168.0.100[500] parsed IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) CERTREQ ] received cert request for "C=CH, O=Linux strongSwan, CN=strongSwan Root CA" sending cert request for "C=CH, O=Linux strongSwan, CN=strongSwan Root CA" authentication of 'carol@strongswan.org' (myself) with RSA signature successful sending end entity cert "C=CH, O=Linux strongSwan, OU=Research, CN=carol@strongswan.org" establishing CHILD_SA home-icmp generating IKE_AUTH request 1 [ IDi CERT CERTREQ IDr AUTH SA TSi TSr N(MOBIKE_SUP) N(ADD_6_ADDR) ] sending packet: from 192.168.0.100[4500] to 192.168.0.1[4500] received packet: from 192.168.0.1[4500] to 192.168.0.100[4500] parsed IKE_AUTH response 1 [ IDr CERT AUTH SA TSi TSr N(AUTH_LFT) N(MOBIKE_SUP) N(ADD_4_ADDR) N(ADD_6_ADDR) N(ADD_6_ADDR) ] received end entity cert "C=CH, O=Linux strongSwan, CN=moon.strongswan.org" using certificate "C=CH, O=Linux strongSwan, CN=moon.strongswan.org" using trusted ca certificate "C=CH, O=Linux strongSwan, CN=strongSwan Root CA" checking certificate status of "C=CH, O=Linux strongSwan, CN=moon.strongswan.org" fetching crl from 'http://crl.strongswan.org/strongswan.crl' ... using trusted certificate "C=CH, O=Linux strongSwan, CN=strongSwan Root CA" crl correctly signed by "C=CH, O=Linux strongSwan, CN=strongSwan Root CA" crl is valid: until Aug 19 13:47:17 2009 certificate status is good authentication of 'moon.strongswan.org' with RSA signature successful scheduling reauthentication in 3419s maximum IKE_SA lifetime 3599s IKE_SA home-icmp[1] established between 192.168.0.100[carol@strongswan.org]...192.168.0.1[moon.strongswan.org] carol# ipsec up home-ssh establishing CHILD_SA home-ssh generating CREATE_CHILD_SA request 2 [ SA No TSi TSr ] sending packet: from 192.168.0.100[4500] to 192.168.0.1[4500] received packet: from 192.168.0.1[4500] to 192.168.0.100[4500] parsed CREATE_CHILD_SA response 2 [ SA No TSi TSr ] TEST carol# ipsec statusall | grep 'home-icmp.*INSTALLED' [YES] home-icmp{1}: INSTALLED, TUNNEL, ESP SPIs: caa8e228_i cb151dbb_o carol# ipsec statusall | grep 'home-ssh.*INSTALLED' [YES] home-ssh{2}: INSTALLED, TUNNEL, ESP SPIs: c17f27e5_i c64e40cd_o moon# ipsec statusall | grep 'rw-icmp.*INSTALLED' [YES] rw-icmp{1}: INSTALLED, TUNNEL, ESP SPIs: cb151dbb_i caa8e228_o moon# ipsec statusall | grep 'rw-ssh.*INSTALLED' [YES] rw-ssh{2}: INSTALLED, TUNNEL, ESP SPIs: c64e40cd_i c17f27e5_o 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.91 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.480 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] 17:06:48.432994 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xcb151dbb,seq=0x1), length 132 17:06:48.739347 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xcb151dbb,seq=0x2), length 132 17:06:49.142841 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x1), length 100 17:06:49.143615 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x2), length 100 17:06:49.208954 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x3), length 100 17:06:49.211868 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x4), length 116 17:06:49.213053 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x5), length 884 17:06:49.249389 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x6), length 116 17:06:49.280570 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x7), length 244 17:06:49.307239 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x8), length 116 17:06:49.318244 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x9), length 148 17:06:49.319373 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0xa), length 164 17:06:49.338097 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0xb), length 484 17:06:49.350972 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0xc), length 228 17:06:49.366501 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0xd), length 164 17:06:49.439152 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0xe), length 100 17:06:49.441795 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0xf), length 132 17:06:49.442398 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x10), length 100 17:06:49.464514 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xc64e40cd,seq=0x11), length 100 moon# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > carol.strongswan.org: ESP' [YES] 17:06:48.434555 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xcaa8e228,seq=0x1), length 132 17:06:48.739506 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xcaa8e228,seq=0x2), length 132 17:06:49.143391 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x1), length 100 17:06:49.208653 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x2), length 116 17:06:49.212241 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x3), length 100 17:06:49.213461 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x4), length 100 17:06:49.241421 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x5), length 884 17:06:49.269419 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x6), length 100 17:06:49.272376 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x7), length 244 17:06:49.280855 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x8), length 100 17:06:49.298164 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x9), length 564 17:06:49.317917 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0xa), length 100 17:06:49.318591 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0xb), length 100 17:06:49.318719 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0xc), length 148 17:06:49.325722 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0xd), length 164 17:06:49.348706 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0xe), length 132 17:06:49.365780 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0xf), length 148 17:06:49.438340 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x10), length 308 17:06:49.438443 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x11), length 148 17:06:49.438557 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x12), length 164 17:06:49.464256 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xc17f27e5,seq=0x13), 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 ]