From 7430f44c472319541e1b48786e6b3c79a554b052 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Tue, 6 Nov 2007 17:50:43 +0000 Subject: [PATCH] added rw-ikev1 IPv6 scenario --- testing/tests/ipv6/rw-ikev1/description.txt | 5 ++++ testing/tests/ipv6/rw-ikev1/evaltest.dat | 5 ++++ .../tests/ipv6/rw-ikev1/hosts/carol/etc/ipsec.conf | 28 ++++++++++++++++++++++ .../tests/ipv6/rw-ikev1/hosts/moon/etc/ipsec.conf | 23 ++++++++++++++++++ testing/tests/ipv6/rw-ikev1/posttest.dat | 3 +++ testing/tests/ipv6/rw-ikev1/pretest.dat | 6 +++++ testing/tests/ipv6/rw-ikev1/test.conf | 21 ++++++++++++++++ 7 files changed, 91 insertions(+) create mode 100644 testing/tests/ipv6/rw-ikev1/description.txt create mode 100644 testing/tests/ipv6/rw-ikev1/evaltest.dat create mode 100755 testing/tests/ipv6/rw-ikev1/hosts/carol/etc/ipsec.conf create mode 100755 testing/tests/ipv6/rw-ikev1/hosts/moon/etc/ipsec.conf create mode 100644 testing/tests/ipv6/rw-ikev1/posttest.dat create mode 100644 testing/tests/ipv6/rw-ikev1/pretest.dat create mode 100644 testing/tests/ipv6/rw-ikev1/test.conf diff --git a/testing/tests/ipv6/rw-ikev1/description.txt b/testing/tests/ipv6/rw-ikev1/description.txt new file mode 100644 index 0000000..3ec8555 --- /dev/null +++ b/testing/tests/ipv6/rw-ikev1/description.txt @@ -0,0 +1,5 @@ +The roadwarrior carol sets up a connection to gateway moon. +The authentication is based on X.509 certificates. +In order to test the IPv6 ESP tunnel, carol sends an IPv6 ICMP request +to the client alice behind the gateway moon using the ping6 +command. diff --git a/testing/tests/ipv6/rw-ikev1/evaltest.dat b/testing/tests/ipv6/rw-ikev1/evaltest.dat new file mode 100644 index 0000000..894e911 --- /dev/null +++ b/testing/tests/ipv6/rw-ikev1/evaltest.dat @@ -0,0 +1,5 @@ +carol::ipsec status::home.*STATE_QUICK_I2.*IPsec SA established::YES +moon::ipsec status::rw.*STATE_QUICK_R2.*IPsec SA established::YES +carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES +moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES +moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES diff --git a/testing/tests/ipv6/rw-ikev1/hosts/carol/etc/ipsec.conf b/testing/tests/ipv6/rw-ikev1/hosts/carol/etc/ipsec.conf new file mode 100755 index 0000000..7430f74 --- /dev/null +++ b/testing/tests/ipv6/rw-ikev1/hosts/carol/etc/ipsec.conf @@ -0,0 +1,28 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + plutodebug=control + crlcheckinterval=180 + strictcrlpolicy=no + charonstart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + +conn home + left=PH_IP6_CAROL + leftnexthop=0::0 + leftcert=carolCert.pem + leftid=carol@strongswan.org + right=PH_IP6_MOON + rightnexthop=0::0 + rightsubnet=fec1::/16 + rightid=@moon.strongswan.org + auto=add + + + + diff --git a/testing/tests/ipv6/rw-ikev1/hosts/moon/etc/ipsec.conf b/testing/tests/ipv6/rw-ikev1/hosts/moon/etc/ipsec.conf new file mode 100755 index 0000000..923ccd6 --- /dev/null +++ b/testing/tests/ipv6/rw-ikev1/hosts/moon/etc/ipsec.conf @@ -0,0 +1,23 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + plutodebug=control + crlcheckinterval=180 + strictcrlpolicy=no + charonstart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + +conn rw + left=PH_IP6_MOON + leftnexthop=0::0 + leftcert=moonCert.pem + leftid=@moon.strongswan.org + leftsubnet=fec1::/16 + right=%any + rightnexthop=0::0 + auto=add diff --git a/testing/tests/ipv6/rw-ikev1/posttest.dat b/testing/tests/ipv6/rw-ikev1/posttest.dat new file mode 100644 index 0000000..16dac1b --- /dev/null +++ b/testing/tests/ipv6/rw-ikev1/posttest.dat @@ -0,0 +1,3 @@ +moon::ipsec stop +carol::ipsec stop +alice::"ip route del fec0:\:/16 via fec1:\:1" diff --git a/testing/tests/ipv6/rw-ikev1/pretest.dat b/testing/tests/ipv6/rw-ikev1/pretest.dat new file mode 100644 index 0000000..3df25e3 --- /dev/null +++ b/testing/tests/ipv6/rw-ikev1/pretest.dat @@ -0,0 +1,6 @@ +moon::echo "1" >/proc/sys/net/ipv6/conf/all/forwarding +alice::"ip route add fec0:\:/16 via fec1:\:1" +carol::ipsec start +moon::ipsec start +carol::sleep 2 +carol::ipsec up home diff --git a/testing/tests/ipv6/rw-ikev1/test.conf b/testing/tests/ipv6/rw-ikev1/test.conf new file mode 100644 index 0000000..9cd583b --- /dev/null +++ b/testing/tests/ipv6/rw-ikev1/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" + +# Corresponding block diagram +# +DIAGRAM="a-m-c-w.png" + +# UML instances on which tcpdump is to be started +# +TCPDUMPHOSTS="moon" + +# UML instances on which IPsec is started +# Used for IPsec logging purposes +# +IPSECHOSTS="moon carol" -- 2.7.4