new net2net ipv6 scenarios for IKEv1 and IKEv2
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 6 Nov 2007 13:44:57 +0000 (13:44 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 6 Nov 2007 13:44:57 +0000 (13:44 -0000)
15 files changed:
testing/INSTALL
testing/tests/ipv6/net2net-ikev1/description.txt [new file with mode: 0644]
testing/tests/ipv6/net2net-ikev1/evaltest.dat [new file with mode: 0644]
testing/tests/ipv6/net2net-ikev1/hosts/moon/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ipv6/net2net-ikev1/hosts/sun/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ipv6/net2net-ikev1/posttest.dat [new file with mode: 0644]
testing/tests/ipv6/net2net-ikev1/pretest.dat [new file with mode: 0644]
testing/tests/ipv6/net2net-ikev1/test.conf [new file with mode: 0644]
testing/tests/ipv6/net2net-ikev2/description.txt [new file with mode: 0644]
testing/tests/ipv6/net2net-ikev2/evaltest.dat [new file with mode: 0644]
testing/tests/ipv6/net2net-ikev2/hosts/moon/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ipv6/net2net-ikev2/hosts/sun/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ipv6/net2net-ikev2/posttest.dat [new file with mode: 0644]
testing/tests/ipv6/net2net-ikev2/pretest.dat [new file with mode: 0644]
testing/tests/ipv6/net2net-ikev2/test.conf [new file with mode: 0644]

index d5571bb..fcb4d26 100644 (file)
@@ -71,7 +71,7 @@ are required for the strongSwan testing environment:
 
     * The latest strongSwan distribution
 
-      http://download.strongswan.org/strongswan-4.1.8.tar.gz
+      http://download.strongswan.org/strongswan-4.1.9.tar.gz
 
 
 3. Creating the environment
diff --git a/testing/tests/ipv6/net2net-ikev1/description.txt b/testing/tests/ipv6/net2net-ikev1/description.txt
new file mode 100644 (file)
index 0000000..4c1b5c8
--- /dev/null
@@ -0,0 +1,4 @@
+An IPv6 ESP tunnel connection between the gateways <b>moon</b> and <b>sun</b> is successfully set up.
+It connects the two subnets hiding behind their respective gateways. The authentication is based on
+X.509 certificates. In order to test the net-to-net tunnel client <b>alice</b> behind <b>moon</b>
+sends an IPv6 ICMP request to client <b>bob</b> behind <b>sun</b> using the ping6 command.
diff --git a/testing/tests/ipv6/net2net-ikev1/evaltest.dat b/testing/tests/ipv6/net2net-ikev1/evaltest.dat
new file mode 100644 (file)
index 0000000..459b0a6
--- /dev/null
@@ -0,0 +1,5 @@
+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::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
+sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
+sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
diff --git a/testing/tests/ipv6/net2net-ikev1/hosts/moon/etc/ipsec.conf b/testing/tests/ipv6/net2net-ikev1/hosts/moon/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..9499140
--- /dev/null
@@ -0,0 +1,30 @@
+# /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 net-net
+       also=host-host
+       leftsubnet=fec1::0/16
+       rightsubnet=fec2::0/16
+
+conn host-host
+       left=PH_IP6_MOON
+       leftnexthop=0::0
+       leftcert=moonCert.pem
+       leftid=@moon.strongswan.org
+       leftfirewall=yes
+       right=PH_IP6_SUN
+       rightnexthop=0::0
+       rightid=@sun.strongswan.org
+       auto=add
+
diff --git a/testing/tests/ipv6/net2net-ikev1/hosts/sun/etc/ipsec.conf b/testing/tests/ipv6/net2net-ikev1/hosts/sun/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..c64904a
--- /dev/null
@@ -0,0 +1,29 @@
+# /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 net-net
+       also=host-host
+       leftsubnet=fec2::0/16
+       rightsubnet=fec1::0/16
+
+conn host-host
+       left=PH_IP6_SUN
+       leftnexthop=0::0
+       leftcert=sunCert.pem
+       leftid=@sun.strongswan.org
+       leftfirewall=yes
+       right=PH_IP6_MOON
+       rightnexthop=0::0
+       rightid=@moon.strongswan.org
+       auto=add
diff --git a/testing/tests/ipv6/net2net-ikev1/posttest.dat b/testing/tests/ipv6/net2net-ikev1/posttest.dat
new file mode 100644 (file)
index 0000000..f527995
--- /dev/null
@@ -0,0 +1,6 @@
+moon::ipsec stop
+sun::ipsec stop
+alice::"ip route del fec2:\:/16 via fec1:\:1"
+moon::"ip route del fec2:\:/16 via fec0:\:2"
+sun::"ip route del fec1:\:/16 via fec0:\:1"
+bob::"ip route del fec1:\:/16 via fec2:\:1"
diff --git a/testing/tests/ipv6/net2net-ikev1/pretest.dat b/testing/tests/ipv6/net2net-ikev1/pretest.dat
new file mode 100644 (file)
index 0000000..347a27b
--- /dev/null
@@ -0,0 +1,10 @@
+moon::echo "1" >/proc/sys/net/ipv6/conf/all/forwarding
+sun::echo "1" >/proc/sys/net/ipv6/conf/all/forwarding
+alice::"ip route add fec2:\:/16 via fec1:\:1"
+moon::"ip route add fec2:\:/16 via fec0:\:2"
+sun::"ip route add fec1:\:/16 via fec0:\:1"
+bob::"ip route add fec1:\:/16 via fec2:\:1"
+moon::ipsec start
+sun::ipsec start
+moon::sleep 2 
+moon::ipsec up net-net
diff --git a/testing/tests/ipv6/net2net-ikev1/test.conf b/testing/tests/ipv6/net2net-ikev1/test.conf
new file mode 100644 (file)
index 0000000..9ebb969
--- /dev/null
@@ -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"
diff --git a/testing/tests/ipv6/net2net-ikev2/description.txt b/testing/tests/ipv6/net2net-ikev2/description.txt
new file mode 100644 (file)
index 0000000..4c1b5c8
--- /dev/null
@@ -0,0 +1,4 @@
+An IPv6 ESP tunnel connection between the gateways <b>moon</b> and <b>sun</b> is successfully set up.
+It connects the two subnets hiding behind their respective gateways. The authentication is based on
+X.509 certificates. In order to test the net-to-net tunnel client <b>alice</b> behind <b>moon</b>
+sends an IPv6 ICMP request to client <b>bob</b> behind <b>sun</b> using the ping6 command.
diff --git a/testing/tests/ipv6/net2net-ikev2/evaltest.dat b/testing/tests/ipv6/net2net-ikev2/evaltest.dat
new file mode 100644 (file)
index 0000000..1b4e7c8
--- /dev/null
@@ -0,0 +1,5 @@
+moon::ipsec status::net-net.*INSTALLED::YES
+sun::ipsec status::net.net.*INSTALLED::YES
+alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
+sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
+sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
diff --git a/testing/tests/ipv6/net2net-ikev2/hosts/moon/etc/ipsec.conf b/testing/tests/ipv6/net2net-ikev2/hosts/moon/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..da750b1
--- /dev/null
@@ -0,0 +1,27 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+       strictcrlpolicy=no
+       plutostart=no
+
+conn %default
+       ikelifetime=60m
+       keylife=20m
+       rekeymargin=3m
+       keyingtries=1
+       keyexchange=ikev2
+
+conn net-net
+       also=host-host
+       leftsubnet=fec1::0/16
+       rightsubnet=fec2::0/16
+
+conn host-host
+       left=PH_IP6_MOON
+       leftcert=moonCert.pem
+       leftid=@moon.strongswan.org
+       leftfirewall=yes
+       right=PH_IP6_SUN
+       rightid=@sun.strongswan.org
+       auto=add
+
diff --git a/testing/tests/ipv6/net2net-ikev2/hosts/sun/etc/ipsec.conf b/testing/tests/ipv6/net2net-ikev2/hosts/sun/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..bad82a8
--- /dev/null
@@ -0,0 +1,26 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+       strictcrlpolicy=no
+       plutostart=no
+
+conn %default
+       ikelifetime=60m
+       keylife=20m
+       rekeymargin=3m
+       keyingtries=1
+       keyexchange=ikev2
+
+conn net-net
+       also=host-host
+       leftsubnet=fec2::0/16
+       rightsubnet=fec1::0/16
+
+conn host-host
+       left=PH_IP6_SUN
+       leftcert=sunCert.pem
+       leftid=@sun.strongswan.org
+       leftfirewall=yes
+       right=PH_IP6_MOON
+       rightid=@moon.strongswan.org
+       auto=add
diff --git a/testing/tests/ipv6/net2net-ikev2/posttest.dat b/testing/tests/ipv6/net2net-ikev2/posttest.dat
new file mode 100644 (file)
index 0000000..f527995
--- /dev/null
@@ -0,0 +1,6 @@
+moon::ipsec stop
+sun::ipsec stop
+alice::"ip route del fec2:\:/16 via fec1:\:1"
+moon::"ip route del fec2:\:/16 via fec0:\:2"
+sun::"ip route del fec1:\:/16 via fec0:\:1"
+bob::"ip route del fec1:\:/16 via fec2:\:1"
diff --git a/testing/tests/ipv6/net2net-ikev2/pretest.dat b/testing/tests/ipv6/net2net-ikev2/pretest.dat
new file mode 100644 (file)
index 0000000..347a27b
--- /dev/null
@@ -0,0 +1,10 @@
+moon::echo "1" >/proc/sys/net/ipv6/conf/all/forwarding
+sun::echo "1" >/proc/sys/net/ipv6/conf/all/forwarding
+alice::"ip route add fec2:\:/16 via fec1:\:1"
+moon::"ip route add fec2:\:/16 via fec0:\:2"
+sun::"ip route add fec1:\:/16 via fec0:\:1"
+bob::"ip route add fec1:\:/16 via fec2:\:1"
+moon::ipsec start
+sun::ipsec start
+moon::sleep 2 
+moon::ipsec up net-net
diff --git a/testing/tests/ipv6/net2net-ikev2/test.conf b/testing/tests/ipv6/net2net-ikev2/test.conf
new file mode 100644 (file)
index 0000000..9ebb969
--- /dev/null
@@ -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"