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 ] dave# /etc/init.d/iptables start 2> /dev/null * Caching service dependencies ... [ ok ] * Starting firewall ... [ ok ] alice# cat /etc/raddb/clients.conf client 10.1.0.1 { secret = gv6URkSs shortname = moon } alice# cat /etc/raddb/eap.conf eap { default_eap_type = sim sim { } } alice# cat /etc/raddb/proxy.conf realm strongswan.org { type = radius authhost = LOCAL accthost = LOCAL } alice# cat /etc/raddb/triplets.dat carol@strongswan.org,30000000000000000000000000000000,30112233,305566778899AABB carol@strongswan.org,31000000000000000000000000000000,31112233,315566778899AABB carol@strongswan.org,32000000000000000000000000000000,32112233,325566778899AABB dave@strongswan.org,33000000000000000000000000000000,33112233,335566778899AABB dave@strongswan.org,34000000000000000000000000000000,34112233,345566778899AABB dave@strongswan.org,35000000000000000000000000000000,35112233,355566778899AABB alice# /etc/init.d/radiusd start * Caching service dependencies ... [ ok ] * Starting radiusd ... [ ok ] moon# ipsec start Starting strongSwan 4.2.17 IPsec [starter]... carol# ipsec start Starting strongSwan 4.2.17 IPsec [starter]... dave# 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 @ 0x80aa918 0: 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0............... found triplet: => 16 bytes @ 0x809e3c0 0: 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0............... => 4 bytes @ 0x809e3d0 0: 30 11 22 33 0."3 => 8 bytes @ 0x809e3d4 0: 30 55 66 77 88 99 AA BB 0Ufw.... looking for rand: => 16 bytes @ 0x80aa928 0: 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1............... found triplet: => 16 bytes @ 0x809e620 0: 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1............... => 4 bytes @ 0x809e630 0: 31 11 22 33 1."3 => 8 bytes @ 0x809e634 0: 31 55 66 77 88 99 AA BB 1Ufw.... looking for rand: => 16 bytes @ 0x80aa938 0: 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2............... found triplet: => 16 bytes @ 0x80a07e0 0: 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2............... => 4 bytes @ 0x80a07f0 0: 32 11 22 33 2."3 => 8 bytes @ 0x80a07f4 0: 32 55 66 77 88 99 AA BB 2Ufw.... 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 3279s maximum IKE_SA lifetime 3459s IKE_SA home[1] established between 192.168.0.100[carol@strongswan.org]...192.168.0.1[moon.strongswan.org] dave# 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.200[500] to 192.168.0.1[500] received packet: from 192.168.0.1[500] to 192.168.0.200[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.200[4500] to 192.168.0.1[4500] received packet: from 192.168.0.1[4500] to 192.168.0.200[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.200[4500] to 192.168.0.1[4500] received packet: from 192.168.0.1[4500] to 192.168.0.200[4500] parsed IKE_AUTH response 2 [ EAP ] looking for rand: => 16 bytes @ 0x80aa910 0: 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3............... found triplet: => 16 bytes @ 0x809e3c0 0: 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3............... => 4 bytes @ 0x809e3d0 0: 33 11 22 44 3."D => 8 bytes @ 0x809e3d4 0: 33 55 66 77 88 99 AA BB 3Ufw.... looking for rand: => 16 bytes @ 0x80aa920 0: 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4............... found triplet: => 16 bytes @ 0x809e620 0: 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4............... => 4 bytes @ 0x809e630 0: 34 11 22 44 4."D => 8 bytes @ 0x809e634 0: 34 55 66 77 88 99 AA BB 4Ufw.... looking for rand: => 16 bytes @ 0x80aa930 0: 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5............... found triplet: => 16 bytes @ 0x80a07e0 0: 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5............... => 4 bytes @ 0x80a07f0 0: 35 11 22 44 5."D => 8 bytes @ 0x80a07f4 0: 35 55 66 77 88 99 AA BB 5Ufw.... generating IKE_AUTH request 3 [ EAP ] sending packet: from 192.168.0.200[4500] to 192.168.0.1[4500] received packet: from 192.168.0.1[4500] to 192.168.0.200[4500] parsed IKE_AUTH response 3 [ EAP ] received EAP_FAILURE, EAP authentication failed failed to authenticate against 'moon.strongswan.org' using EAP dave# sleep 1 TEST carol# cat /var/log/daemon.log | grep 'authentication of 'moon.strongswan.org' with RSA signature successful' [YES] Jul 20 16:37:35 carol charon: 14[IKE] authentication of 'moon.strongswan.org' with RSA signature successful carol# cat /var/log/daemon.log | grep 'EAP server requested EAP_SIM authentication' [YES] Jul 20 16:37:35 carol charon: 14[IKE] EAP server requested EAP_SIM authentication carol# cat /var/log/daemon.log | grep 'authentication of 'moon.strongswan.org' with EAP successful' [YES] Jul 20 16:37:35 carol charon: 17[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:37:35 moon charon: 14[IKE] authentication of 'carol@strongswan.org' with EAP successful moon# ipsec statusall | grep 'rw-eap.*ESTABLISHED.*carol@strongswan.org' [YES] rw-eap[1]: ESTABLISHED 5 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 5 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.762 ms moon# killall tcpdump moon# cat /tmp/tcpdump.log | grep 'IP carol.strongswan.org > moon.strongswan.org: ESP' [YES] 16:37:41.334826 IP carol.strongswan.org > moon.strongswan.org: ESP(spi=0xcfe90cf6,seq=0x1), length 132 moon# cat /tmp/tcpdump.log | grep 'IP moon.strongswan.org > carol.strongswan.org: ESP' [YES] 16:37:41.335302 IP moon.strongswan.org > carol.strongswan.org: ESP(spi=0xcc7ebb55,seq=0x1), length 132 moon# cat /var/log/daemon.log | grep 'received Access-Reject from RADIUS server' [YES] Jul 20 16:37:37 moon charon: 16[CFG] received Access-Reject from RADIUS server moon# cat /var/log/daemon.log | grep 'authentication of 'dave@strongswan.org' with EAP failed' [YES] Jul 20 16:37:37 moon charon: 16[IKE] authentication of 'dave@strongswan.org' with EAP failed moon# ipsec statusall | grep 'rw-eap.*ESTABLISHED.*dave@strongswan.org' [NO] dave# cat /var/log/daemon.log | grep 'received EAP_FAILURE, EAP authentication failed' [YES] Jul 20 16:37:38 dave charon: 16[IKE] received EAP_FAILURE, EAP authentication failed dave# ipsec statusall | grep 'home.*ESTABLISHED' [NO] dave# ping -c 1 10.1.0.10 | grep '64 bytes from 10.1.0.10: icmp_seq=1' [NO] ping: sendmsg: Operation not permitted POST-TEST moon# ipsec stop Stopping strongSwan IPsec... carol# ipsec stop Stopping strongSwan IPsec... dave# ipsec stop Stopping strongSwan IPsec... alice# /etc/init.d/radiusd stop * Stopping radiusd ... [ ok ] moon# /etc/init.d/iptables stop 2> /dev/null * Stopping firewall ... [ ok ] carol# /etc/init.d/iptables stop 2> /dev/null * Stopping firewall ... [ ok ] dave# /etc/init.d/iptables stop 2> /dev/null * Stopping firewall ... [ ok ]