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.3.6 IPsec [starter]... sun# ipsec start Starting strongSwan 4.3.6 IPsec [starter]... moon# sleep 2 moon# ipsec up host-host initiating IKE_SA host-host[1] to 192.168.0.2 generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ] sending packet: from 192.168.0.1[500] to 192.168.0.2[500] received packet: from 192.168.0.2[500] to 192.168.0.1[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 'moon.strongswan.org' (myself) with RSA signature successful sending end entity cert "C=CH, O=Linux strongSwan, CN=moon.strongswan.org" establishing CHILD_SA host-host generating IKE_AUTH request 1 [ IDi CERT CERTREQ IDr AUTH N(USE_TRANSP) SA TSi TSr N(EAP_ONLY) ] sending packet: from 192.168.0.1[500] to 192.168.0.2[500] received packet: from 192.168.0.2[500] to 192.168.0.1[500] parsed IKE_AUTH response 1 [ IDr CERT AUTH N(USE_TRANSP) SA TSi TSr N(AUTH_LFT) ] received end entity cert "C=CH, O=Linux strongSwan, CN=sun.strongswan.org" using certificate "C=CH, O=Linux strongSwan, CN=sun.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=sun.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 Mar 29 23:27:26 2010 certificate status is good reached self-signed root ca with a path length of 0 authentication of 'sun.strongswan.org' with RSA signature successful IKE_SA host-host[1] established between 192.168.0.1[moon.strongswan.org]...192.168.0.2[sun.strongswan.org] scheduling reauthentication in 3377s maximum IKE_SA lifetime 3557s TEST moon# cat /var/log/daemon.log | grep 'parsed IKE_AUTH response.*N(USE_TRANSP)' [YES] Feb 28 00:18:36 moon charon: 15[ENC] parsed IKE_AUTH response 1 [ IDr CERT AUTH N(USE_TRANSP) SA TSi TSr N(AUTH_LFT) ] moon# ipsec status | grep 'host-host.*INSTALLED.*TRANSPORT' [YES] host-host{1}: INSTALLED, TRANSPORT, ESP SPIs: c11cac7c_i ccc0a260_o sun# ipsec status | grep 'host-host.*INSTALLED.*TRANSPORT' [YES] host-host{1}: INSTALLED, TRANSPORT, ESP SPIs: ccc0a260_i c11cac7c_o moon# ip xfrm state | grep 'mode transport' [YES] proto esp spi 0xccc0a260 reqid 1 mode transport proto esp spi 0xc11cac7c reqid 1 mode transport sun# ip xfrm state | grep 'mode transport' [YES] proto esp spi 0xc11cac7c reqid 1 mode transport proto esp spi 0xccc0a260 reqid 1 mode transport moon# ping -c 1 192.168.0.2 | grep '64 bytes from 192.168.0.2: icmp_seq=1' [YES] 64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=1.23 ms sun# killall tcpdump sun# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > sun.strongswan.org: ESP' [YES] 00:18:38.010322 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xccc0a260,seq=0x1), length 116 sun# cat /tmp/tcpdump.log | grep 'IP sun.strongswan.org > moon.strongswan.org: ESP' [YES] 00:18:38.010393 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xc11cac7c,seq=0x1), length 116 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 ]