diff options
author | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2007-07-05 00:05:56 +0000 |
---|---|---|
committer | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2007-07-05 00:05:56 +0000 |
commit | 5db544cc26db378616a46dfa22138f0008cf2930 (patch) | |
tree | ff9254d87967bb6f703a5ab5e63edcde2e8a6c17 /testing/tests/ikev1/passthrough | |
parent | 3d44c2edf1a3663c7d4acc4434bc8a3abace1ebf (diff) | |
download | vyos-strongswan-5db544cc26db378616a46dfa22138f0008cf2930.tar.gz vyos-strongswan-5db544cc26db378616a46dfa22138f0008cf2930.zip |
- Updated to new upstream release.
Diffstat (limited to 'testing/tests/ikev1/passthrough')
-rw-r--r-- | testing/tests/ikev1/passthrough/description.txt | 6 | ||||
-rw-r--r-- | testing/tests/ikev1/passthrough/evaltest.dat | 9 | ||||
-rwxr-xr-x | testing/tests/ikev1/passthrough/hosts/moon/etc/ipsec.conf | 32 | ||||
-rwxr-xr-x | testing/tests/ikev1/passthrough/hosts/sun/etc/ipsec.conf | 25 | ||||
-rw-r--r-- | testing/tests/ikev1/passthrough/posttest.dat | 4 | ||||
-rw-r--r-- | testing/tests/ikev1/passthrough/pretest.dat | 8 | ||||
-rw-r--r-- | testing/tests/ikev1/passthrough/test.conf | 21 |
7 files changed, 105 insertions, 0 deletions
diff --git a/testing/tests/ikev1/passthrough/description.txt b/testing/tests/ikev1/passthrough/description.txt new file mode 100644 index 000000000..145c5b79c --- /dev/null +++ b/testing/tests/ikev1/passthrough/description.txt @@ -0,0 +1,6 @@ +All IP traffic from the subnet behind the gateway <b>moon</b> is tunneled +to the gateway <b>sun</b> using the 0.0.0.0/0 network mask. In order +to prevent local subnet traffic from escaping through the tunnel, a +passthrough policy for the 10.1.0.0/16 network is inserted on <b>moon</b>. +A series of internal and external pings verifies the correct +functioning of the setup. diff --git a/testing/tests/ikev1/passthrough/evaltest.dat b/testing/tests/ikev1/passthrough/evaltest.dat new file mode 100644 index 000000000..942222f08 --- /dev/null +++ b/testing/tests/ikev1/passthrough/evaltest.dat @@ -0,0 +1,9 @@ +moon::ipsec status::net-net.*STATE_QUICK_I2.*IPsec SA established::YES +sun::ipsec status::net-net.*STATE_QUICK_R2.*IPsec SA established::YES +alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES +alice::ping -c 1 PH_IP_MOON1::64 bytes from PH_IP_MOON1: icmp_seq=1::YES +alice::ping -c 1 PH_IP_MOON::64 bytes from PH_IP_MOON: icmp_seq=1::YES +moon::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES +moon::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: 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 diff --git a/testing/tests/ikev1/passthrough/hosts/moon/etc/ipsec.conf b/testing/tests/ikev1/passthrough/hosts/moon/etc/ipsec.conf new file mode 100755 index 000000000..557fb62eb --- /dev/null +++ b/testing/tests/ikev1/passthrough/hosts/moon/etc/ipsec.conf @@ -0,0 +1,32 @@ +# /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 + left=PH_IP_MOON + leftsubnet=10.1.0.0/16 + right=PH_IP_SUN + +conn net-net + rightsubnet=0.0.0.0/0 + rightid=@sun.strongswan.org + leftid=@moon.strongswan.org + leftcert=moonCert.pem + leftsourceip=10.1.0.1 + leftfirewall=yes + lefthostaccess=yes + auto=add + +conn pass + rightsubnet=10.1.0.0/16 + type=passthrough + authby=never + auto=route diff --git a/testing/tests/ikev1/passthrough/hosts/sun/etc/ipsec.conf b/testing/tests/ikev1/passthrough/hosts/sun/etc/ipsec.conf new file mode 100755 index 000000000..9276f1f90 --- /dev/null +++ b/testing/tests/ikev1/passthrough/hosts/sun/etc/ipsec.conf @@ -0,0 +1,25 @@ +# /etc/ipsec.conf - strongSwan IPsec configuration file + +config setup + plutodebug=control + crlcheckinterval=180 + strictcrlpolicy=no + nat_traversal=yes + charonstart=no + +conn %default + ikelifetime=60m + keylife=20m + rekeymargin=3m + keyingtries=1 + +conn net-net + left=PH_IP_SUN + leftcert=sunCert.pem + leftid=@sun.strongswan.org + leftfirewall=yes + leftsubnet=0.0.0.0/0 + right=PH_IP_MOON + rightsubnet=10.1.0.0/16 + rightid=@moon.strongswan.org + auto=add diff --git a/testing/tests/ikev1/passthrough/posttest.dat b/testing/tests/ikev1/passthrough/posttest.dat new file mode 100644 index 000000000..5a9150bc8 --- /dev/null +++ b/testing/tests/ikev1/passthrough/posttest.dat @@ -0,0 +1,4 @@ +moon::ipsec stop +sun::ipsec stop +moon::/etc/init.d/iptables stop 2> /dev/null +sun::/etc/init.d/iptables stop 2> /dev/null diff --git a/testing/tests/ikev1/passthrough/pretest.dat b/testing/tests/ikev1/passthrough/pretest.dat new file mode 100644 index 000000000..2606db192 --- /dev/null +++ b/testing/tests/ikev1/passthrough/pretest.dat @@ -0,0 +1,8 @@ +moon::/etc/init.d/iptables start 2> /dev/null +sun::/etc/init.d/iptables start 2> /dev/null +moon::iptables -I INPUT -i eth1 -s 10.1.0.0/16 -j ACCEPT +moon::iptables -I OUTPUT -o eth1 -d 10.1.0.0/16 -j ACCEPT +moon::ipsec start +sun::ipsec start +moon::sleep 2 +moon::ipsec up net-net diff --git a/testing/tests/ikev1/passthrough/test.conf b/testing/tests/ikev1/passthrough/test.conf new file mode 100644 index 000000000..d9a61590f --- /dev/null +++ b/testing/tests/ikev1/passthrough/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="sun" + +# UML instances on which IPsec is started +# Used for IPsec logging purposes +# +IPSECHOSTS="moon sun" |