TCPDUMP moon# tcpdump -i eth0 not port ssh and not port domain and not arp > /tmp/tcpdump.log 2>&1 & PRE-TEST alice# /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 ] sun# ip route add 10.1.0.0/16 via 192.168.0.1 winnetou# ip route add 10.1.0.0/16 via 192.168.0.1 moon# echo 1 > /proc/sys/net/ipv4/ip_forward alice# ipsec start Starting strongSwan 4.3.6 IPsec [starter]... sun# ipsec start Starting strongSwan 4.3.6 IPsec [starter]... alice# sleep 4 alice# ipsec up nat-t initiating IKE_SA nat-t[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 10.1.0.10[500] to 192.168.0.2[500] received packet: from 192.168.0.2[500] to 10.1.0.10[500] parsed IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) CERTREQ N(MULT_AUTH) ] faking NAT situation to enforce UDP encapsulation 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 'alice@strongswan.org' (myself) with RSA signature successful sending end entity cert "C=CH, O=Linux strongSwan, OU=Sales, CN=alice@strongswan.org" establishing CHILD_SA nat-t generating IKE_AUTH request 1 [ IDi CERT CERTREQ IDr AUTH SA TSi TSr N(MOBIKE_SUP) N(ADD_6_ADDR) N(MULT_AUTH) N(EAP_ONLY) ] sending packet: from 10.1.0.10[4500] to 192.168.0.2[4500] received packet: from 192.168.0.2[4500] to 10.1.0.10[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=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 nat-t[1] established between 10.1.0.10[alice@strongswan.org]...192.168.0.2[sun.strongswan.org] scheduling reauthentication in 3375s maximum IKE_SA lifetime 3555s alice# sleep 1 TEST alice# cat /var/log/daemon.log | grep 'faking NAT situation to enforce UDP encapsulation' [YES] Feb 28 00:17:27 alice charon: 15[IKE] faking NAT situation to enforce UDP encapsulation alice# ipsec statusall | grep 'nat-t.*INSTALLED' [YES] nat-t{1}: INSTALLED, TUNNEL, ESP in UDP SPIs: c7057bbe_i c21d98ad_o sun# ipsec statusall | grep 'nat-t.*INSTALLED' [YES] nat-t{1}: INSTALLED, TUNNEL, ESP in UDP SPIs: c21d98ad_i c7057bbe_o 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=63 time=11.7 ms moon# killall tcpdump moon# cat /tmp/tcpdump.log | grep 'IP alice.strongswan.org.* > sun.strongswan.org.ipsec-nat-t: UDP' [YES] 00:17:30.454486 IP alice.strongswan.org.ipsec-nat-t > sun.strongswan.org.ipsec-nat-t: UDP-encap: ESP(spi=0xc21d98ad,seq=0x1), length 132 moon# cat /tmp/tcpdump.log | grep 'IP sun.strongswan.org.ipsec-nat-t > alice.strongswan.org.*: UDP' [YES] 00:17:30.466029 IP sun.strongswan.org.ipsec-nat-t > alice.strongswan.org.ipsec-nat-t: UDP-encap: ESP(spi=0xc7057bbe,seq=0x1), length 132 POST-TEST alice# ipsec stop Stopping strongSwan IPsec... sun# ipsec stop Stopping strongSwan IPsec... alice# /etc/init.d/iptables stop 2> /dev/null * Stopping firewall ... [ ok ] sun# /etc/init.d/iptables stop 2> /dev/null * Stopping firewall ... [ ok ] sun# ip route del 10.1.0.0/16 via 192.168.0.1 winnetou# ip route del 10.1.0.0/16 via 192.168.0.1