TCPDUMP sun# tcpdump -i eth0 not port ssh and not port domain and not arp > /tmp/tcpdump.log 2>&1 & PRE-TEST moon# rm /etc/ipsec.d/cacerts/* sun# rm /etc/ipsec.d/cacerts/* moon# cat /etc/ipsec.d/tables.sql /etc/ipsec.d/data.sql > /etc/ipsec.d/ipsec.sql sun# cat /etc/ipsec.d/tables.sql /etc/ipsec.d/data.sql > /etc/ipsec.d/ipsec.sql moon# cat /etc/ipsec.d/ipsec.sql | sqlite3 /etc/ipsec.d/ipsec.db sun# cat /etc/ipsec.d/ipsec.sql | sqlite3 /etc/ipsec.d/ipsec.db 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 1 moon# ipsec up net-net initiating IKE_SA net-net[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) N(MULT_AUTH) ] authentication of 'moon.strongswan.org' (myself) with pre-shared key establishing CHILD_SA net-net generating IKE_AUTH request 1 [ IDi IDr AUTH N(USE_TRANSP) SA TSi TSr N(MULT_AUTH) 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 AUTH SA TSi TSr N(AUTH_LFT) ] authentication of 'sun.strongswan.org' with pre-shared key successful IKE_SA net-net[1] established between 192.168.0.1[moon.strongswan.org]...192.168.0.2[sun.strongswan.org] scheduling reauthentication in 3509s maximum IKE_SA lifetime 3809s moon# sleep 1 TEST moon# ipsec statusall | grep 'net-net.*ESTABLISHED' [YES] net-net[1]: ESTABLISHED 2 seconds ago, 192.168.0.1[moon.strongswan.org]...192.168.0.2[sun.strongswan.org] sun# ipsec statusall | grep 'net-net.*ESTABLISHED' [YES] net-net[1]: ESTABLISHED 2 seconds ago, 192.168.0.2[sun.strongswan.org]...192.168.0.1[moon.strongswan.org] 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=62 time=2.77 ms sun# killall tcpdump sun# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > sun.strongswan.org: ESP' [YES] 01:24:16.552790 IP moon.strongswan.org > sun.strongswan.org: ESP(spi=0xc517feb4,seq=0x1), length 132 sun# cat /tmp/tcpdump.log | grep 'IP sun.strongswan.org > moon.strongswan.org: ESP' [YES] 01:24:16.553027 IP sun.strongswan.org > moon.strongswan.org: ESP(spi=0xcf68c699,seq=0x1), length 132 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 ] moon# rm /etc/ipsec.d/ipsec.* sun# rm /etc/ipsec.d/ipsec.*