From b0d8ed94fe9e74afb49fdf5f11e4add29879c65c Mon Sep 17 00:00:00 2001 From: Rene Mayrhofer Date: Thu, 12 Apr 2007 20:30:08 +0000 Subject: [svn-upgrade] Integrating new upstream version, strongswan (4.1.1) --- testing/tests/ike/rw-cert/description.txt | 5 ++++ testing/tests/ike/rw-cert/evaltest.dat | 11 +++++++++ .../tests/ike/rw-cert/hosts/dave/etc/ipsec.conf | 22 +++++++++++++++++ .../tests/ike/rw-cert/hosts/moon/etc/ipsec.conf | 20 ++++++++++++++++ testing/tests/ike/rw-cert/posttest.dat | 3 +++ testing/tests/ike/rw-cert/pretest.dat | 8 +++++++ testing/tests/ike/rw-cert/test.conf | 21 ++++++++++++++++ testing/tests/ike/rw_v1-net_v2/description.txt | 7 ++++++ testing/tests/ike/rw_v1-net_v2/evaltest.dat | 10 ++++++++ .../ike/rw_v1-net_v2/hosts/moon/etc/ipsec.conf | 28 ++++++++++++++++++++++ .../ike/rw_v1-net_v2/hosts/sun/etc/ipsec.conf | 15 ++++++++++++ testing/tests/ike/rw_v1-net_v2/posttest.dat | 3 +++ testing/tests/ike/rw_v1-net_v2/pretest.dat | 9 +++++++ testing/tests/ike/rw_v1-net_v2/test.conf | 21 ++++++++++++++++ 14 files changed, 183 insertions(+) create mode 100644 testing/tests/ike/rw-cert/description.txt create mode 100644 testing/tests/ike/rw-cert/evaltest.dat create mode 100755 testing/tests/ike/rw-cert/hosts/dave/etc/ipsec.conf create mode 100755 testing/tests/ike/rw-cert/hosts/moon/etc/ipsec.conf create mode 100644 testing/tests/ike/rw-cert/posttest.dat create mode 100644 testing/tests/ike/rw-cert/pretest.dat create mode 100644 testing/tests/ike/rw-cert/test.conf create mode 100644 testing/tests/ike/rw_v1-net_v2/description.txt create mode 100644 testing/tests/ike/rw_v1-net_v2/evaltest.dat create mode 100755 testing/tests/ike/rw_v1-net_v2/hosts/moon/etc/ipsec.conf create mode 100755 testing/tests/ike/rw_v1-net_v2/hosts/sun/etc/ipsec.conf create mode 100644 testing/tests/ike/rw_v1-net_v2/posttest.dat create mode 100644 testing/tests/ike/rw_v1-net_v2/pretest.dat create mode 100644 testing/tests/ike/rw_v1-net_v2/test.conf (limited to 'testing/tests/ike') diff --git a/testing/tests/ike/rw-cert/description.txt b/testing/tests/ike/rw-cert/description.txt new file mode 100644 index 000000000..b48a89026 --- /dev/null +++ b/testing/tests/ike/rw-cert/description.txt @@ -0,0 +1,5 @@ +Roadwarrior carol sets up an IKEv1 connection and roadwarrior dave +an IKEv2 tunnel, respectively, to the gateway moon. +In order to test the established tunnels, both roadwarriors ping the client alice +in the subnet behind gateway moon. +. diff --git a/testing/tests/ike/rw-cert/evaltest.dat b/testing/tests/ike/rw-cert/evaltest.dat new file mode 100644 index 000000000..71496d2f2 --- /dev/null +++ b/testing/tests/ike/rw-cert/evaltest.dat @@ -0,0 +1,11 @@ +moon::ipsec statusall::rw.*STATE_QUICK_R2.*IPsec SA established::YES +moon::ipsec statusall::rw.*ESTABLISHED::YES +carol::ipsec statusall::home.*STATE_QUICK_I2.*IPsec SA established::YES +dave::ipsec statusall::home.*ESTABLISHED::YES +carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES +dave::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES +moon::tcpdump::IP carol.strongswan.org > moon.strongswan.org: ESP::YES +moon::tcpdump::IP moon.strongswan.org > carol.strongswan.org: ESP::YES +moon::tcpdump::IP dave.strongswan.org > moon.strongswan.org: ESP::YES +moon::tcpdump::IP moon.strongswan.org > dave.strongswan.org: ESP::YES + diff --git a/testing/tests/ike/rw-cert/hosts/dave/etc/ipsec.conf b/testing/tests/ike/rw-cert/hosts/dave/etc/ipsec.conf new file mode 100755 index 000000000..5d78605e9 --- /dev/null +++ b/testing/tests/ike/rw-cert/hosts/dave/etc/ipsec.conf @@ -0,0 +1,22 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + strictcrlpolicy=no + plutostart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + +conn home + left=PH_IP_DAVE + leftnexthop=%direct + leftcert=daveCert.pem + leftid=dave@strongswan.org + right=PH_IP_MOON + rightid=@moon.strongswan.org + rightsubnet=10.1.0.0/16 + keyexchange=ikev2 + auto=add diff --git a/testing/tests/ike/rw-cert/hosts/moon/etc/ipsec.conf b/testing/tests/ike/rw-cert/hosts/moon/etc/ipsec.conf new file mode 100755 index 000000000..841a67491 --- /dev/null +++ b/testing/tests/ike/rw-cert/hosts/moon/etc/ipsec.conf @@ -0,0 +1,20 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + plutodebug=control + crlcheckinterval=180 + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + +conn rw + left=PH_IP_MOON + leftnexthop=%direct + leftcert=moonCert.pem + leftid=@moon.strongswan.org + leftsubnet=10.1.0.0/16 + right=%any + auto=add diff --git a/testing/tests/ike/rw-cert/posttest.dat b/testing/tests/ike/rw-cert/posttest.dat new file mode 100644 index 000000000..ed530f6d9 --- /dev/null +++ b/testing/tests/ike/rw-cert/posttest.dat @@ -0,0 +1,3 @@ +moon::ipsec stop +carol::ipsec stop +dave::ipsec stop diff --git a/testing/tests/ike/rw-cert/pretest.dat b/testing/tests/ike/rw-cert/pretest.dat new file mode 100644 index 000000000..587b6aeed --- /dev/null +++ b/testing/tests/ike/rw-cert/pretest.dat @@ -0,0 +1,8 @@ +moon::echo 1 > /proc/sys/net/ipv4/ip_forward +moon::ipsec start +carol::ipsec start +dave::ipsec start +carol::sleep 1 +carol::ipsec up home +dave::ipsec up home +dave::sleep 1 diff --git a/testing/tests/ike/rw-cert/test.conf b/testing/tests/ike/rw-cert/test.conf new file mode 100644 index 000000000..845a6dcd7 --- /dev/null +++ b/testing/tests/ike/rw-cert/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="moon" + +# UML instances on which IPsec is started +# Used for IPsec logging purposes +# +IPSECHOSTS="moon carol dave" diff --git a/testing/tests/ike/rw_v1-net_v2/description.txt b/testing/tests/ike/rw_v1-net_v2/description.txt new file mode 100644 index 000000000..292e09d40 --- /dev/null +++ b/testing/tests/ike/rw_v1-net_v2/description.txt @@ -0,0 +1,7 @@ +A connection between the subnets behind the gateways moon and sun +is set up using the IKEv2 key exchange protocol whereas the roadwarrior carol +negotiates the connection via the IKEv1 protocol. +In order to test the established tunnels, client alice behind gateway moon +pings client bob located behind gateway sun and roadwarrior carol +pings the client alice behind moon. +. diff --git a/testing/tests/ike/rw_v1-net_v2/evaltest.dat b/testing/tests/ike/rw_v1-net_v2/evaltest.dat new file mode 100644 index 000000000..4eace50b7 --- /dev/null +++ b/testing/tests/ike/rw_v1-net_v2/evaltest.dat @@ -0,0 +1,10 @@ +moon::ipsec statusall::net-net.*ESTABLISHED::YES +sun::ipsec statusall::net-net.*ESTABLISHED::YES +alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES +sun::tcpdump::IP moon.strongswan.org > sun.strongswan.org: ESP::YES +sun::tcpdump::IP sun.strongswan.org > moon.strongswan.org: ESP::YES +carol::ipsec status::home.*STATE_QUICK_I2.*IPsec SA established::YES +moon::ipsec status::rw.*STATE_QUICK_R2.*IPsec SA established::YES +carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES +moon::tcpdump::IP carol.strongswan.org > moon.strongswan.org: ESP::YES +moon::tcpdump::IP moon.strongswan.org > carol.strongswan.org: ESP::YES diff --git a/testing/tests/ike/rw_v1-net_v2/hosts/moon/etc/ipsec.conf b/testing/tests/ike/rw_v1-net_v2/hosts/moon/etc/ipsec.conf new file mode 100755 index 000000000..b72a3e939 --- /dev/null +++ b/testing/tests/ike/rw_v1-net_v2/hosts/moon/etc/ipsec.conf @@ -0,0 +1,28 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + plutodebug=control + crlcheckinterval=180 + +conn %default + ikelifetime=60m + keylife=20m + left=PH_IP_MOON + leftnexthop=%direct + leftcert=moonCert.pem + leftid=@moon.strongswan.org + leftsubnet=10.1.0.0/16 + +conn net-net + right=PH_IP_SUN + rightid=@sun.strongswan.org + rightsubnet=10.2.0.0/16 + keyexchange=ikev2 + auto=add + +conn rw + right=%any + rightid=carol@strongswan.org + keyexchange=ikev1 + auto=add + diff --git a/testing/tests/ike/rw_v1-net_v2/hosts/sun/etc/ipsec.conf b/testing/tests/ike/rw_v1-net_v2/hosts/sun/etc/ipsec.conf new file mode 100755 index 000000000..e5a9fe396 --- /dev/null +++ b/testing/tests/ike/rw_v1-net_v2/hosts/sun/etc/ipsec.conf @@ -0,0 +1,15 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + plutostart=no + +conn net-net + left=PH_IP_SUN + leftcert=sunCert.pem + leftid=@sun.strongswan.org + leftsubnet=10.2.0.0/16 + right=PH_IP_MOON + rightid=@moon.strongswan.org + rightsubnet=10.1.0.0/16 + keyexchange=ikev2 + auto=add diff --git a/testing/tests/ike/rw_v1-net_v2/posttest.dat b/testing/tests/ike/rw_v1-net_v2/posttest.dat new file mode 100644 index 000000000..0980371a5 --- /dev/null +++ b/testing/tests/ike/rw_v1-net_v2/posttest.dat @@ -0,0 +1,3 @@ +carol::ipsec stop +moon::ipsec stop +sun::ipsec stop diff --git a/testing/tests/ike/rw_v1-net_v2/pretest.dat b/testing/tests/ike/rw_v1-net_v2/pretest.dat new file mode 100644 index 000000000..03b8dc218 --- /dev/null +++ b/testing/tests/ike/rw_v1-net_v2/pretest.dat @@ -0,0 +1,9 @@ +moon::echo 1 > /proc/sys/net/ipv4/ip_forward +sun::echo 1 > /proc/sys/net/ipv4/ip_forward +moon::ipsec start +sun::ipsec start +carol::ipsec start +moon::sleep 1 +moon::ipsec up net-net +carol::ipsec up home +moon::sleep 1 diff --git a/testing/tests/ike/rw_v1-net_v2/test.conf b/testing/tests/ike/rw_v1-net_v2/test.conf new file mode 100644 index 000000000..983881e5d --- /dev/null +++ b/testing/tests/ike/rw_v1-net_v2/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 winnetou sun bob" + +# Corresponding block diagram +# +DIAGRAM="a-m-w-s-b.png" + +# UML instances on which tcpdump is to be started +# +TCPDUMPHOSTS="moon sun" + +# UML instances on which IPsec is started +# Used for IPsec logging purposes +# +IPSECHOSTS="carol moon sun" -- cgit v1.2.3