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# cat /etc/ipsec.d/triplets.dat carol@strongswan.org,100,210,310 carol@strongswan.org,200,220,320 carol@strongswan.org,300,230,330 carol# cat /etc/ipsec.d/triplets.dat moon.strongswan.org,100,210,310 moon.strongswan.org,200,220,320 moon.strongswan.org,300,230,330 moon# ipsec start Starting strongSwan 4.2.17 IPsec [starter]... carol# ipsec start Starting strongSwan 4.2.17 IPsec [starter]... carol# sleep 1 carol# ipsec up home initiating IKE_SA home[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) ] sending cert request for "C=CH, O=Linux strongSwan, CN=strongSwan Root CA" establishing CHILD_SA home generating IKE_AUTH request 1 [ IDi CERTREQ IDr 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 EAP ] 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 EAP server requested EAP_SIM authentication generating IKE_AUTH request 2 [ EAP ] 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 2 [ EAP ] looking for rand: => 16 bytes @ 0x80ada58 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 ................ found triplet: => 16 bytes @ 0x80a0dc8 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 ................ => 4 bytes @ 0x80a0dd8 0: 00 00 02 10 .... => 8 bytes @ 0x80a0ddc 0: 00 00 00 00 00 00 03 10 ........ looking for rand: => 16 bytes @ 0x80ada68 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 ................ found triplet: => 16 bytes @ 0x80a0e98 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 ................ => 4 bytes @ 0x80a0ea8 0: 00 00 02 20 ... => 8 bytes @ 0x80a0eac 0: 00 00 00 00 00 00 03 20 ....... looking for rand: => 16 bytes @ 0x80ada78 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 ................ found triplet: => 16 bytes @ 0x80a1058 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 ................ => 4 bytes @ 0x80a1068 0: 00 00 02 30 ...0 => 8 bytes @ 0x80a106c 0: 00 00 00 00 00 00 03 30 .......0 generating IKE_AUTH request 3 [ EAP ] 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 3 [ EAP ] authentication of 'carol@strongswan.org' (myself) with EAP generating IKE_AUTH request 4 [ AUTH ] 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 4 [ AUTH SA TSi TSr N(AUTH_LFT) N(MOBIKE_SUP) N(ADD_4_ADDR) N(ADD_6_ADDR) N(ADD_6_ADDR) ] authentication of 'moon.strongswan.org' with EAP successful scheduling reauthentication in 3375s maximum IKE_SA lifetime 3555s IKE_SA home[1] established between 192.168.0.100[carol@strongswan.org]...192.168.0.1[moon.strongswan.org] carol# sleep 1 TEST carol# cat /var/log/daemon.log | grep 'authentication of 'moon.strongswan.org' with RSA signature successful' [YES] Jul 20 16:38:39 carol charon: 08[IKE] authentication of 'moon.strongswan.org' with RSA signature successful carol# cat /var/log/daemon.log | grep 'authentication of 'moon.strongswan.org' with EAP successful' [YES] Jul 20 16:38:40 carol charon: 16[IKE] authentication of 'moon.strongswan.org' with EAP successful moon# cat /var/log/daemon.log | grep 'authentication of 'carol@strongswan.org' with EAP successful' [YES] Jul 20 16:38:39 moon charon: 14[IKE] authentication of 'carol@strongswan.org' with EAP successful moon# ipsec statusall | grep 'rw-eapsim.*ESTABLISHED' [YES] rw-eapsim[1]: ESTABLISHED 3 seconds ago, 192.168.0.1[moon.strongswan.org]...192.168.0.100[carol@strongswan.org] carol# ipsec statusall | grep 'home.*ESTABLISHED' [YES] home[1]: ESTABLISHED 3 seconds ago, 192.168.0.100[carol@strongswan.org]...192.168.0.1[moon.strongswan.org] 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=0.748 ms moon# killall tcpdump moon# cat /tmp/tcpdump.log | grep 'IP carol.strongswan.org > moon.strongswan.org: ESP' [YES] 16:38:43.687914 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xcde6c61d,seq=0x1), length 132 moon# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > carol.strongswan.org: ESP' [YES] 16:38:43.688336 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xcce236cf,seq=0x1), length 132 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 ]