From c1343b3278cdf99533b7902744d15969f9d6fdc1 Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Wed, 2 Jan 2013 14:18:20 +0100 Subject: Imported Upstream version 5.0.1 --- testing/tests/ikev1/ip-two-pools/description.txt | 9 --- testing/tests/ikev1/ip-two-pools/evaltest.dat | 18 ----- .../ip-two-pools/hosts/alice/etc/init.d/iptables | 78 ------------------- .../ikev1/ip-two-pools/hosts/alice/etc/ipsec.conf | 24 ------ .../ip-two-pools/hosts/alice/etc/strongswan.conf | 11 --- .../ikev1/ip-two-pools/hosts/carol/etc/ipsec.conf | 24 ------ .../ip-two-pools/hosts/carol/etc/strongswan.conf | 11 --- .../ip-two-pools/hosts/moon/etc/init.d/iptables | 91 ---------------------- .../ikev1/ip-two-pools/hosts/moon/etc/ipsec.conf | 28 ------- .../ip-two-pools/hosts/moon/etc/strongswan.conf | 11 --- testing/tests/ikev1/ip-two-pools/posttest.dat | 12 --- testing/tests/ikev1/ip-two-pools/pretest.dat | 12 --- testing/tests/ikev1/ip-two-pools/test.conf | 21 ----- 13 files changed, 350 deletions(-) delete mode 100644 testing/tests/ikev1/ip-two-pools/description.txt delete mode 100644 testing/tests/ikev1/ip-two-pools/evaltest.dat delete mode 100755 testing/tests/ikev1/ip-two-pools/hosts/alice/etc/init.d/iptables delete mode 100755 testing/tests/ikev1/ip-two-pools/hosts/alice/etc/ipsec.conf delete mode 100644 testing/tests/ikev1/ip-two-pools/hosts/alice/etc/strongswan.conf delete mode 100755 testing/tests/ikev1/ip-two-pools/hosts/carol/etc/ipsec.conf delete mode 100644 testing/tests/ikev1/ip-two-pools/hosts/carol/etc/strongswan.conf delete mode 100755 testing/tests/ikev1/ip-two-pools/hosts/moon/etc/init.d/iptables delete mode 100755 testing/tests/ikev1/ip-two-pools/hosts/moon/etc/ipsec.conf delete mode 100644 testing/tests/ikev1/ip-two-pools/hosts/moon/etc/strongswan.conf delete mode 100644 testing/tests/ikev1/ip-two-pools/posttest.dat delete mode 100644 testing/tests/ikev1/ip-two-pools/pretest.dat delete mode 100644 testing/tests/ikev1/ip-two-pools/test.conf (limited to 'testing/tests/ikev1/ip-two-pools') diff --git a/testing/tests/ikev1/ip-two-pools/description.txt b/testing/tests/ikev1/ip-two-pools/description.txt deleted file mode 100644 index 33a5187c5..000000000 --- a/testing/tests/ikev1/ip-two-pools/description.txt +++ /dev/null @@ -1,9 +0,0 @@ -The hosts alice and carol set up a tunnel connection each to gateway moon. -Both hosts request a virtual IP via the IKEv1 Mode Config payload by using the -leftsourceip=%config parameter. Gateway moon assigns virtual IP -addresses from a simple pool defined by rightsourceip=10.3.0.0/28 to hosts connecting -to the eth0 (PH_IP_MOON) interface and virtual IP addresses from a simple pool defined -by rightsourceip=10.4.0.0/28 to hosts connecting to the eth1 (PH_IP_MOON1) interface. -

-Thus carol is assigned PH_IP_CAROL1 whereas alice gets 10.4.0.1 and -both ping the gateway moon. diff --git a/testing/tests/ikev1/ip-two-pools/evaltest.dat b/testing/tests/ikev1/ip-two-pools/evaltest.dat deleted file mode 100644 index 2f19a77ba..000000000 --- a/testing/tests/ikev1/ip-two-pools/evaltest.dat +++ /dev/null @@ -1,18 +0,0 @@ -carol::ipsec status::home.*IPsec SA established::YES -alice::ipsec status::home.*IPsec SA established::YES -moon::ipsec status::ext.*carol@strongswan.org.*erouted::YES -moon::ipsec status::int.*alice@strongswan.org.*erouted::YES -moon::cat /var/log/auth.log::adding virtual IP address pool.*int.*10.4.0.0/28::YES -moon::cat /var/log/auth.log::adding virtual IP address pool.*ext.*10.3.0.0/28::YES -moon::ipsec leases ext::1/15, 1 online::YES -moon::ipsec leases int::1/15, 1 online::YES -moon::ipsec leases ext 10.3.0.1::carol@strongswan.org::YES -moon::ipsec leases int 10.4.0.1::alice@strongswan.org::YES -carol::cat /var/log/auth.log::setting virtual IP source address to 10.3.0.1::YES -alice::cat /var/log/auth.log::setting virtual IP source address to 10.4.0.1::YES -carol::ping -c 1 PH_IP_MOON::64 bytes from PH_IP_MOON: icmp_seq=1::YES -alice::ping -c 1 PH_IP_MOON1::64 bytes from PH_IP_MOON1: icmp_seq=1::YES -carol::tcpdump::IP carol.strongswan.org > moon.strongswan.org: ESP::YES -carol::tcpdump::IP moon.strongswan.org > carol.strongswan.org: ESP::YES -alice::tcpdump::IP alice.strongswan.org > moon1.strongswan.org: ESP::YES -alice::tcpdump::IP moon1.strongswan.org > alice.strongswan.org: ESP::YES diff --git a/testing/tests/ikev1/ip-two-pools/hosts/alice/etc/init.d/iptables b/testing/tests/ikev1/ip-two-pools/hosts/alice/etc/init.d/iptables deleted file mode 100755 index 97b773645..000000000 --- a/testing/tests/ikev1/ip-two-pools/hosts/alice/etc/init.d/iptables +++ /dev/null @@ -1,78 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -opts="start stop reload" - -depend() { - before net - need logger -} - -start() { - ebegin "Starting firewall" - - # default policy is DROP - /sbin/iptables -P INPUT DROP - /sbin/iptables -P OUTPUT DROP - /sbin/iptables -P FORWARD DROP - - # allow ESP - iptables -A INPUT -i eth0 -p 50 -j ACCEPT - iptables -A OUTPUT -o eth0 -p 50 -j ACCEPT - - # allow IKE - iptables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT - iptables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT - - # allow MOBIKE - iptables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT - iptables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT - - - # allow crl fetch from winnetou - iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT - iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT - - # allow ssh - iptables -A INPUT -p tcp --dport 22 -j ACCEPT - iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT - - eend $? -} - -stop() { - ebegin "Stopping firewall" - for a in `cat /proc/net/ip_tables_names`; do - /sbin/iptables -F -t $a - /sbin/iptables -X -t $a - - if [ $a == nat ]; then - /sbin/iptables -t nat -P PREROUTING ACCEPT - /sbin/iptables -t nat -P POSTROUTING ACCEPT - /sbin/iptables -t nat -P OUTPUT ACCEPT - elif [ $a == mangle ]; then - /sbin/iptables -t mangle -P PREROUTING ACCEPT - /sbin/iptables -t mangle -P INPUT ACCEPT - /sbin/iptables -t mangle -P FORWARD ACCEPT - /sbin/iptables -t mangle -P OUTPUT ACCEPT - /sbin/iptables -t mangle -P POSTROUTING ACCEPT - elif [ $a == filter ]; then - /sbin/iptables -t filter -P INPUT ACCEPT - /sbin/iptables -t filter -P FORWARD ACCEPT - /sbin/iptables -t filter -P OUTPUT ACCEPT - fi - done - eend $? -} - -reload() { - ebegin "Flushing firewall" - for a in `cat /proc/net/ip_tables_names`; do - /sbin/iptables -F -t $a - /sbin/iptables -X -t $a - done; - eend $? - start -} - diff --git a/testing/tests/ikev1/ip-two-pools/hosts/alice/etc/ipsec.conf b/testing/tests/ikev1/ip-two-pools/hosts/alice/etc/ipsec.conf deleted file mode 100755 index e8077b22a..000000000 --- a/testing/tests/ikev1/ip-two-pools/hosts/alice/etc/ipsec.conf +++ /dev/null @@ -1,24 +0,0 @@ -# /etc/ipsec.conf - strongSwan IPsec configuration file - -config setup - crlcheckinterval=180 - strictcrlpolicy=no - charonstart=no - plutodebug=control - -conn %default - ikelifetime=60m - keylife=20m - rekeymargin=3m - keyingtries=1 - keyexchange=ikev1 - -conn home - left=%defaultroute - leftsourceip=%config - leftcert=aliceCert.pem - leftid=alice@strongswan.org - leftfirewall=yes - right=PH_IP_MOON1 - rightid=@moon.strongswan.org - auto=add diff --git a/testing/tests/ikev1/ip-two-pools/hosts/alice/etc/strongswan.conf b/testing/tests/ikev1/ip-two-pools/hosts/alice/etc/strongswan.conf deleted file mode 100644 index 4c40f76cc..000000000 --- a/testing/tests/ikev1/ip-two-pools/hosts/alice/etc/strongswan.conf +++ /dev/null @@ -1,11 +0,0 @@ -# /etc/strongswan.conf - strongSwan configuration file - -pluto { - load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 gmp random curl kernel-netlink -} - -# pluto uses optimized DH exponent sizes (RFC 3526) - -libstrongswan { - dh_exponent_ansi_x9_42 = no -} diff --git a/testing/tests/ikev1/ip-two-pools/hosts/carol/etc/ipsec.conf b/testing/tests/ikev1/ip-two-pools/hosts/carol/etc/ipsec.conf deleted file mode 100755 index 99a8c60ff..000000000 --- a/testing/tests/ikev1/ip-two-pools/hosts/carol/etc/ipsec.conf +++ /dev/null @@ -1,24 +0,0 @@ -# /etc/ipsec.conf - strongSwan IPsec configuration file - -config setup - crlcheckinterval=180 - strictcrlpolicy=no - charonstart=no - plutodebug=control - -conn %default - ikelifetime=60m - keylife=20m - rekeymargin=3m - keyingtries=1 - keyexchange=ikev1 - -conn home - left=PH_IP_CAROL - leftsourceip=%config - leftcert=carolCert.pem - leftid=carol@strongswan.org - leftfirewall=yes - right=PH_IP_MOON - rightid=@moon.strongswan.org - auto=add diff --git a/testing/tests/ikev1/ip-two-pools/hosts/carol/etc/strongswan.conf b/testing/tests/ikev1/ip-two-pools/hosts/carol/etc/strongswan.conf deleted file mode 100644 index 4c40f76cc..000000000 --- a/testing/tests/ikev1/ip-two-pools/hosts/carol/etc/strongswan.conf +++ /dev/null @@ -1,11 +0,0 @@ -# /etc/strongswan.conf - strongSwan configuration file - -pluto { - load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 gmp random curl kernel-netlink -} - -# pluto uses optimized DH exponent sizes (RFC 3526) - -libstrongswan { - dh_exponent_ansi_x9_42 = no -} diff --git a/testing/tests/ikev1/ip-two-pools/hosts/moon/etc/init.d/iptables b/testing/tests/ikev1/ip-two-pools/hosts/moon/etc/init.d/iptables deleted file mode 100755 index bb9d03acd..000000000 --- a/testing/tests/ikev1/ip-two-pools/hosts/moon/etc/init.d/iptables +++ /dev/null @@ -1,91 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -opts="start stop reload" - -depend() { - before net - need logger -} - -start() { - ebegin "Starting firewall" - - # enable IP forwarding - echo 1 > /proc/sys/net/ipv4/ip_forward - - # default policy is DROP - /sbin/iptables -P INPUT DROP - /sbin/iptables -P OUTPUT DROP - /sbin/iptables -P FORWARD DROP - - # allow esp - iptables -A INPUT -i eth0 -p 50 -j ACCEPT - iptables -A OUTPUT -o eth0 -p 50 -j ACCEPT - iptables -A INPUT -i eth1 -p 50 -j ACCEPT - iptables -A OUTPUT -o eth1 -p 50 -j ACCEPT - - # allow IKE - iptables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT - iptables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT - iptables -A INPUT -i eth1 -p udp --sport 500 --dport 500 -j ACCEPT - iptables -A OUTPUT -o eth1 -p udp --dport 500 --sport 500 -j ACCEPT - - # allow MobIKE - iptables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT - iptables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT - iptables -A INPUT -i eth1 -p udp --sport 4500 --dport 4500 -j ACCEPT - iptables -A OUTPUT -o eth1 -p udp --dport 4500 --sport 4500 -j ACCEPT - - # allow crl fetch from winnetou - iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT - iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT - iptables -A FORWARD -i eth0 -o eth1 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT - iptables -A FORWARD -o eth0 -i eth1 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT - - # masquerade crl fetches to winnetou - iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -d PH_IP_WINNETOU -j MASQUERADE - - # allow ssh - iptables -A INPUT -p tcp --dport 22 -j ACCEPT - iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT - - eend $? -} - -stop() { - ebegin "Stopping firewall" - for a in `cat /proc/net/ip_tables_names`; do - /sbin/iptables -F -t $a - /sbin/iptables -X -t $a - - if [ $a == nat ]; then - /sbin/iptables -t nat -P PREROUTING ACCEPT - /sbin/iptables -t nat -P POSTROUTING ACCEPT - /sbin/iptables -t nat -P OUTPUT ACCEPT - elif [ $a == mangle ]; then - /sbin/iptables -t mangle -P PREROUTING ACCEPT - /sbin/iptables -t mangle -P INPUT ACCEPT - /sbin/iptables -t mangle -P FORWARD ACCEPT - /sbin/iptables -t mangle -P OUTPUT ACCEPT - /sbin/iptables -t mangle -P POSTROUTING ACCEPT - elif [ $a == filter ]; then - /sbin/iptables -t filter -P INPUT ACCEPT - /sbin/iptables -t filter -P FORWARD ACCEPT - /sbin/iptables -t filter -P OUTPUT ACCEPT - fi - done - eend $? -} - -reload() { - ebegin "Flushing firewall" - for a in `cat /proc/net/ip_tables_names`; do - /sbin/iptables -F -t $a - /sbin/iptables -X -t $a - done; - eend $? - start -} - diff --git a/testing/tests/ikev1/ip-two-pools/hosts/moon/etc/ipsec.conf b/testing/tests/ikev1/ip-two-pools/hosts/moon/etc/ipsec.conf deleted file mode 100755 index 4771e26d6..000000000 --- a/testing/tests/ikev1/ip-two-pools/hosts/moon/etc/ipsec.conf +++ /dev/null @@ -1,28 +0,0 @@ -# /etc/ipsec.conf - strongSwan IPsec configuration file - -config setup - crlcheckinterval=180 - strictcrlpolicy=no - charonstart=no - plutodebug=control - -conn %default - ikelifetime=60m - keylife=20m - rekeymargin=3m - keyingtries=1 - keyexchange=ikev1 - leftcert=moonCert.pem - leftid=@moon.strongswan.org - leftfirewall=yes - right=%any - -conn int - left=PH_IP_MOON1 - rightsourceip=10.4.0.0/28 - auto=add - -conn ext - left=PH_IP_MOON - rightsourceip=10.3.0.0/28 - auto=add diff --git a/testing/tests/ikev1/ip-two-pools/hosts/moon/etc/strongswan.conf b/testing/tests/ikev1/ip-two-pools/hosts/moon/etc/strongswan.conf deleted file mode 100644 index 4c40f76cc..000000000 --- a/testing/tests/ikev1/ip-two-pools/hosts/moon/etc/strongswan.conf +++ /dev/null @@ -1,11 +0,0 @@ -# /etc/strongswan.conf - strongSwan configuration file - -pluto { - load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 gmp random curl kernel-netlink -} - -# pluto uses optimized DH exponent sizes (RFC 3526) - -libstrongswan { - dh_exponent_ansi_x9_42 = no -} diff --git a/testing/tests/ikev1/ip-two-pools/posttest.dat b/testing/tests/ikev1/ip-two-pools/posttest.dat deleted file mode 100644 index 4474e5ade..000000000 --- a/testing/tests/ikev1/ip-two-pools/posttest.dat +++ /dev/null @@ -1,12 +0,0 @@ -alice::ipsec stop -moon::ipsec stop -carol::ipsec stop -moon::/etc/init.d/iptables stop 2> /dev/null -carol::/etc/init.d/iptables stop 2> /dev/null -alice::/etc/init.d/iptables stop 2> /dev/null -carol::ip addr del 10.3.0.1/32 dev eth0 -alice::ip addr del 10.4.0.1/32 dev eth0 -moon::ip route del 10.3.0.0/16 via 192.168.0.1 -moon::ip route del 10.4.0.0/16 via 10.1.0.1 -moon::conntrack -F -moon::rm /etc/ipsec.d/ipsec.* diff --git a/testing/tests/ikev1/ip-two-pools/pretest.dat b/testing/tests/ikev1/ip-two-pools/pretest.dat deleted file mode 100644 index 8091a6ed2..000000000 --- a/testing/tests/ikev1/ip-two-pools/pretest.dat +++ /dev/null @@ -1,12 +0,0 @@ -moon::ip route add 10.3.0.0/16 via 192.168.0.1 -moon::ip route add 10.4.0.0/16 via 10.1.0.1 -moon::/etc/init.d/iptables start 2> /dev/null -carol::/etc/init.d/iptables start 2> /dev/null -alice::/etc/init.d/iptables start 2> /dev/null -carol::ipsec start -moon::ipsec start -alice::ipsec start -carol::sleep 2 -carol::ipsec up home -alice::ipsec up home -alice::sleep 1 diff --git a/testing/tests/ikev1/ip-two-pools/test.conf b/testing/tests/ikev1/ip-two-pools/test.conf deleted file mode 100644 index 329774c0a..000000000 --- a/testing/tests/ikev1/ip-two-pools/test.conf +++ /dev/null @@ -1,21 +0,0 @@ -#!/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="alice carol" - -# UML instances on which IPsec is started -# Used for IPsec logging purposes -# -IPSECHOSTS="alice moon carol" -- cgit v1.2.3