upgraded ikev1 scenarios to 5.0.0

This commit is contained in:
Andreas Steffen
2012-05-23 14:45:15 +02:00
parent 3c475660c5
commit 148b643880
973 changed files with 1476 additions and 13035 deletions
@@ -1,13 +1,7 @@
The peer <b>carol</b> and <b>moon</b> both have dynamic IP addresses, so that the remote end
is defined symbolically by <b>right=%&lt;hostname&gt;</b>. The ipsec starter resolves the
fully-qualified hostname into the current IP address via a DNS lookup (simulated by an
/etc/hosts entry). Since the peer IP addresses are expected to change over time, the option
<b>rightallowany=yes</b> will allow an IKE main mode rekeying to arrive from an arbitrary
IP address under the condition that the peer identity remains unchanged. When this happens
the old tunnel is replaced by an IPsec connection to the new origin.
<p>
In this scenario <b>moon</b> first initiates a tunnel to <b>carol</b>. After some time
the responder <b>carol</b> disconnects (simulated by iptables blocking IKE and ESP traffic).
<b>moon</b> detects via Dead Peer Detection (DPD) that the connection is down and tries to
reconnect. After a few seconds the firewall is opened again and the connection is
reestablished.
The roadwarrior <b>carol</b> sets up an IPsec tunnel connection to the gateway
<b>moon</b>. Both end points activate <b>Dead Peer Detection</b> (DPD) with a
polling interval of 10 s. When the network connectivity between <b>carol</b>
and <b>moon</b> is forcefully disrupted for a duration of 100 s, <b>moon</b>
clears the connection after 4 unsuccessful retransmits whereas <b>carol</b>
also takes down the connection but immediately tries to reconnect which succeeds
as soon as the connection becomes available again.
+12 -9
View File
@@ -1,10 +1,13 @@
moon::ipsec status::STATE_MAIN_I4 (ISAKMP SA established)::YES
carol::iptables -I INPUT 1 -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
carol::sleep 35::no output expected::NO
carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
moon:: iptables -A INPUT -i eth0 -s PH_IP_CAROL -j DROP::no output expected::NO
carol::iptables -A INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
carol::sleep 60::no output expected::NO
carol::cat /var/log/daemon.log::sending DPD request::YES
carol::cat /var/log/daemon.log::DPD check timed out, enforcing DPD action::YES
carol::cat /var/log/daemon.log::restarting CHILD_SA home::YES
carol::iptables -D INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
moon::cat /var/log/auth.log::inserting event EVENT_DPD::YES
moon::cat /var/log/auth.log::DPD: No response from peer - declaring peer dead::YES
moon::cat /var/log/auth.log::DPD: Terminating all SAs using this connection::YES
moon::cat /var/log/auth.log::DPD: Restarting connection::YES
moon::sleep 10::no output expected::NO
moon::ipsec status::STATE_MAIN_I4 (ISAKMP SA established)::YES
moon:: iptables -D INPUT -i eth0 -s PH_IP_CAROL -j DROP::no output expected::NO
carol::sleep 10::no output expected::NO
carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
@@ -1,10 +1,7 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
plutodebug=control
crlcheckinterval=180
strictcrlpolicy=no
charonstart=no
plutostart=no
conn %default
ikelifetime=60m
@@ -12,15 +9,16 @@ conn %default
rekeymargin=3m
keyingtries=1
keyexchange=ikev1
dpdaction=restart
dpddelay=10
dpdtimeout=45
conn moon
left=%defaultroute
leftnexthop=%direct
leftsourceip=PH_IP_CAROL1
conn home
left=PH_IP_CAROL
leftcert=carolCert.pem
[email protected]
leftfirewall=yes
right=%moon.strongswan.org
rightsubnet=10.1.0.0/16
right=PH_IP_MOON
[email protected]
rightsubnet=10.1.0.0/16
auto=add
@@ -0,0 +1,5 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
}
@@ -1,10 +1,7 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
plutodebug=control
crlcheckinterval=180
strictcrlpolicy=no
charonstart=no
plutostart=no
conn %default
ikelifetime=60m
@@ -12,19 +9,14 @@ conn %default
rekeymargin=3m
keyingtries=1
keyexchange=ikev1
dpdaction=restart
dpddelay=5
dpdtimeout=25
conn carol
left=%defaultroute
leftnexthop=%direct
leftsubnet=10.1.0.0/16
leftsourceip=PH_IP_MOON1
dpdaction=clear
dpddelay=10
dpdtimeout=45
conn rw
left=PH_IP_MOON
leftcert=moonCert.pem
[email protected]
leftfirewall=yes
right=%carol.strongswan.org
leftsubnet=10.1.0.0/16
right=%any
[email protected]
rightsubnet=PH_IP_CAROL1/32
auto=start
auto=add
@@ -0,0 +1,5 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac xcbc stroke kernel-netlink socket-default
}
+1 -4
View File
@@ -1,5 +1,2 @@
carol::ipsec stop
moon::ipsec stop
moon::/etc/init.d/iptables stop 2> /dev/null
carol::/etc/init.d/iptables stop 2> /dev/null
carol::ip addr del PH_IP_CAROL1/32 dev eth0
carol::ipsec stop
+3 -4
View File
@@ -1,5 +1,4 @@
moon::/etc/init.d/iptables start 2> /dev/null
carol::/etc/init.d/iptables start 2> /dev/null
carol::ipsec start
moon::ipsec start
moon::sleep 4
carol::ipsec start
carol::sleep 2
carol::ipsec up home
+3 -3
View File
@@ -5,15 +5,15 @@
# All UML instances that are required for this test
#
UMLHOSTS="alice moon carol winnetou dave"
UMLHOSTS="moon carol winnetou"
# Corresponding block diagram
#
DIAGRAM="a-m-c-w-d.png"
DIAGRAM="m-c-w.png"
# UML instances on which tcpdump is to be started
#
TCPDUMPHOSTS="moon alice"
TCPDUMPHOSTS=""
# UML instances on which IPsec is started
# Used for IPsec logging purposes