diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2007-05-25 09:22:42 +0000 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2007-05-25 09:22:42 +0000 |
commit | 238b92d632e0987a12c8801c2e072dd6a9246156 (patch) | |
tree | ab50c4a3dd3ea60794615d26dff51bbc478f3dc9 /testing | |
parent | 845cfa025b991d71f63029689d181b38b4756063 (diff) | |
download | strongswan-238b92d632e0987a12c8801c2e072dd6a9246156.tar.bz2 strongswan-238b92d632e0987a12c8801c2e072dd6a9246156.tar.xz |
virtual-ip-override scenario added
Diffstat (limited to 'testing')
8 files changed, 134 insertions, 0 deletions
diff --git a/testing/tests/ikev2/virtual-ip-override/description.txt b/testing/tests/ikev2/virtual-ip-override/description.txt new file mode 100644 index 000000000..adb655004 --- /dev/null +++ b/testing/tests/ikev2/virtual-ip-override/description.txt @@ -0,0 +1,7 @@ +The roadwarriors <b>carol</b> and <b>dave</b> both set up a connection to gateway <b>moon</b>. +The roadwarriors each unilaterally define a static virtual IP using the <b>leftsourceip</b> +parameter. In order to detect potential address conflicts, the roadwarriors send +their virtual IPs embedded in a configuration payload to <b>moon</b> for verification. +In our scenario <b>carol</b> and <b>dave</b> both request the same IP address. +These requests are overridden by gateway <b>moon</b> which assigns a +distinct virtual IP to each road warrior. diff --git a/testing/tests/ikev2/virtual-ip-override/evaltest.dat b/testing/tests/ikev2/virtual-ip-override/evaltest.dat new file mode 100644 index 000000000..5216a53bb --- /dev/null +++ b/testing/tests/ikev2/virtual-ip-override/evaltest.dat @@ -0,0 +1,13 @@ +moon::ipsec statusall::rw.*ESTABLISHED.*carol@strongswan.org::YES +moon::ipsec statusall::rw.*ESTABLISHED.*dave@strongswan.org::YES +carol::ipsec statusall::home.*INSTALLED::YES +dave::ipsec statusall::home.*INSTALLED::YES +moon::cat /var/log/daemon.log::peer requested virtual IP PH_IP_CAROL1::YES +moon::cat /var/log/daemon.log::peer requested virtual IP PH_IP_DAVE1::NO +moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_CAROL1 to peer::YES +moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_DAVE1 to peer::YES +carol::ip addr list dev eth0::PH_IP_CAROL1::YES +carol::ip route list dev eth0::src PH_IP_CAROL1::YES +dave::ip addr list dev eth0::PH_IP_DAVE1::YES +dave::ip route list dev eth0::src PH_IP_DAVE1::YES + diff --git a/testing/tests/ikev2/virtual-ip-override/hosts/carol/etc/ipsec.conf b/testing/tests/ikev2/virtual-ip-override/hosts/carol/etc/ipsec.conf new file mode 100755 index 000000000..c9867c7d4 --- /dev/null +++ b/testing/tests/ikev2/virtual-ip-override/hosts/carol/etc/ipsec.conf @@ -0,0 +1,24 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + crlcheckinterval=180 + strictcrlpolicy=no + plutostart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + keyexchange=ikev2 + +conn home + left=PH_IP_CAROL + leftsourceip=PH_IP_CAROL1 + leftcert=carolCert.pem + leftid=carol@strongswan.org + leftfirewall=yes + right=PH_IP_MOON + rightsubnet=10.1.0.0/16 + rightid=@moon.strongswan.org + auto=add diff --git a/testing/tests/ikev2/virtual-ip-override/hosts/dave/etc/ipsec.conf b/testing/tests/ikev2/virtual-ip-override/hosts/dave/etc/ipsec.conf new file mode 100755 index 000000000..98dd99271 --- /dev/null +++ b/testing/tests/ikev2/virtual-ip-override/hosts/dave/etc/ipsec.conf @@ -0,0 +1,24 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + crlcheckinterval=180 + strictcrlpolicy=no + plutostart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + keyexchange=ikev2 + +conn home + left=PH_IP_DAVE + leftsourceip=PH_IP_CAROL1 + leftcert=daveCert.pem + leftid=dave@strongswan.org + leftfirewall=yes + right=PH_IP_MOON + rightsubnet=10.1.0.0/16 + rightid=@moon.strongswan.org + auto=add diff --git a/testing/tests/ikev2/virtual-ip-override/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/virtual-ip-override/hosts/moon/etc/ipsec.conf new file mode 100755 index 000000000..bafd1b155 --- /dev/null +++ b/testing/tests/ikev2/virtual-ip-override/hosts/moon/etc/ipsec.conf @@ -0,0 +1,31 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + crlcheckinterval=180 + strictcrlpolicy=no + plutostart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + keyexchange=ikev2 + left=PH_IP_MOON + leftsubnet=10.1.0.0/16 + leftsourceip=PH_IP_MOON1 + leftcert=moonCert.pem + leftid=@moon.strongswan.org + leftfirewall=yes + +conn rw-carol + right=%any + rightid=carol@strongswan.org + rightsourceip=PH_IP_CAROL1 + auto=add + +conn rw-dave + right=%any + rightid=dave@strongswan.org + rightsourceip=PH_IP_DAVE1 + auto=add diff --git a/testing/tests/ikev2/virtual-ip-override/posttest.dat b/testing/tests/ikev2/virtual-ip-override/posttest.dat new file mode 100644 index 000000000..8fe4cc4f9 --- /dev/null +++ b/testing/tests/ikev2/virtual-ip-override/posttest.dat @@ -0,0 +1,5 @@ +moon::ipsec stop +carol::ipsec stop +moon::/etc/init.d/iptables stop 2> /dev/null +carol::/etc/init.d/iptables stop 2> /dev/null +dave::/etc/init.d/iptables stop 2> /dev/null diff --git a/testing/tests/ikev2/virtual-ip-override/pretest.dat b/testing/tests/ikev2/virtual-ip-override/pretest.dat new file mode 100644 index 000000000..5ec37aae1 --- /dev/null +++ b/testing/tests/ikev2/virtual-ip-override/pretest.dat @@ -0,0 +1,9 @@ +moon::/etc/init.d/iptables start 2> /dev/null +carol::/etc/init.d/iptables start 2> /dev/null +dave::/etc/init.d/iptables start 2> /dev/null +carol::ipsec start +dave::ipsec start +moon::ipsec start +carol::sleep 1 +carol::ipsec up home +dave::ipsec up home diff --git a/testing/tests/ikev2/virtual-ip-override/test.conf b/testing/tests/ikev2/virtual-ip-override/test.conf new file mode 100644 index 000000000..01c94f7fb --- /dev/null +++ b/testing/tests/ikev2/virtual-ip-override/test.conf @@ -0,0 +1,21 @@ +#!/bin/bash +# +# This configuration file provides information on the +# UML instances used for this test + +# All UML instances that are required for this test +# +UMLHOSTS="alice moon carol winnetou dave" + +# Corresponding block diagram +# +DIAGRAM="a-m-c-w-d.png" + +# UML instances on which tcpdump is to be started +# +TCPDUMPHOSTS="" + +# UML instances on which IPsec is started +# Used for IPsec logging purposes +# +IPSECHOSTS="moon carol dave" |