summaryrefslogtreecommitdiff
path: root/testing/tests
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2007-10-26 14:10:02 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2007-10-26 14:10:02 +0000
commit49104abddf3d71d5abf5cf75dc7f95fa6c55fa63 (patch)
tree28f7a72e5dec4abf908fd7874bdab776281310bc /testing/tests
parent7b0305f59ddab9ea026b202a8c569912e5bf9a90 (diff)
downloadvyos-strongswan-49104abddf3d71d5abf5cf75dc7f95fa6c55fa63.tar.gz
vyos-strongswan-49104abddf3d71d5abf5cf75dc7f95fa6c55fa63.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.1.8)
Diffstat (limited to 'testing/tests')
-rwxr-xr-xtesting/tests/ikev1/dynamic-initiator/hosts/carol/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev1/dynamic-initiator/hosts/dave/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev1/dynamic-initiator/hosts/moon/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev1/dynamic-responder/hosts/carol/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev1/dynamic-responder/hosts/dave/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev1/dynamic-responder/hosts/moon/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev1/dynamic-two-peers/hosts/carol/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev1/dynamic-two-peers/hosts/dave/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev1/dynamic-two-peers/hosts/moon/etc/ipsec.conf1
-rw-r--r--testing/tests/ikev1/passthrough/posttest.dat2
-rw-r--r--testing/tests/ikev1/passthrough/pretest.dat3
-rw-r--r--testing/tests/ikev1/xauth-psk-mode-config/hosts/carol/etc/ipsec.secrets6
-rw-r--r--testing/tests/ikev2/config-payload-swapped/evaltest.dat4
-rw-r--r--testing/tests/ikev2/config-payload/evaltest.dat4
-rw-r--r--testing/tests/ikev2/force-udp-encaps/description.txt6
-rw-r--r--testing/tests/ikev2/force-udp-encaps/evaltest.dat6
-rwxr-xr-xtesting/tests/ikev2/force-udp-encaps/hosts/alice/etc/ipsec.conf24
-rwxr-xr-xtesting/tests/ikev2/force-udp-encaps/hosts/sun/etc/init.d/iptables76
-rwxr-xr-xtesting/tests/ikev2/force-udp-encaps/hosts/sun/etc/ipsec.conf35
-rw-r--r--testing/tests/ikev2/force-udp-encaps/posttest.dat6
-rw-r--r--testing/tests/ikev2/force-udp-encaps/pretest.dat11
-rw-r--r--testing/tests/ikev2/force-udp-encaps/test.conf21
-rw-r--r--testing/tests/ikev2/mobike-nat/description.txt2
-rw-r--r--testing/tests/ikev2/mobike-nat/evaltest.dat12
-rwxr-xr-xtesting/tests/ikev2/mobike-nat/hosts/alice/etc/ipsec.conf2
-rw-r--r--testing/tests/ikev2/mobike-virtual-ip/description.txt2
-rw-r--r--testing/tests/ikev2/mobike-virtual-ip/evaltest.dat12
-rwxr-xr-xtesting/tests/ikev2/mobike-virtual-ip/hosts/alice/etc/ipsec.conf2
-rw-r--r--testing/tests/ikev2/nat-two-rw/evaltest.dat2
-rwxr-xr-xtesting/tests/ikev2/net2net-cert/hosts/moon/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev2/net2net-cert/hosts/sun/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev2/net2net-psk/hosts/moon/etc/ipsec.conf3
-rwxr-xr-xtesting/tests/ikev2/net2net-psk/hosts/sun/etc/ipsec.conf3
-rwxr-xr-xtesting/tests/ikev2/net2net-route/hosts/moon/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev2/net2net-route/hosts/sun/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev2/net2net-start/hosts/moon/etc/ipsec.conf1
-rwxr-xr-xtesting/tests/ikev2/net2net-start/hosts/sun/etc/ipsec.conf1
-rw-r--r--testing/tests/ikev2/rw-psk-rsa-mixed/evaltest.dat2
-rw-r--r--testing/tests/ikev2/rw-psk-rsa-split/evaltest.dat2
-rw-r--r--testing/tests/ikev2/virtual-ip-override/evaltest.dat4
-rw-r--r--testing/tests/ikev2/virtual-ip/evaltest.dat4
41 files changed, 241 insertions, 30 deletions
diff --git a/testing/tests/ikev1/dynamic-initiator/hosts/carol/etc/ipsec.conf b/testing/tests/ikev1/dynamic-initiator/hosts/carol/etc/ipsec.conf
index ba6f7bfe9..d8b885a88 100755
--- a/testing/tests/ikev1/dynamic-initiator/hosts/carol/etc/ipsec.conf
+++ b/testing/tests/ikev1/dynamic-initiator/hosts/carol/etc/ipsec.conf
@@ -14,6 +14,7 @@ conn %default
conn moon
left=%defaultroute
+ leftnexthop=%direct
leftsourceip=PH_IP_CAROL1
leftcert=carolCert.pem
leftid=carol@strongswan.org
diff --git a/testing/tests/ikev1/dynamic-initiator/hosts/dave/etc/ipsec.conf b/testing/tests/ikev1/dynamic-initiator/hosts/dave/etc/ipsec.conf
index ba6f7bfe9..d8b885a88 100755
--- a/testing/tests/ikev1/dynamic-initiator/hosts/dave/etc/ipsec.conf
+++ b/testing/tests/ikev1/dynamic-initiator/hosts/dave/etc/ipsec.conf
@@ -14,6 +14,7 @@ conn %default
conn moon
left=%defaultroute
+ leftnexthop=%direct
leftsourceip=PH_IP_CAROL1
leftcert=carolCert.pem
leftid=carol@strongswan.org
diff --git a/testing/tests/ikev1/dynamic-initiator/hosts/moon/etc/ipsec.conf b/testing/tests/ikev1/dynamic-initiator/hosts/moon/etc/ipsec.conf
index 2658293ac..bf39d7527 100755
--- a/testing/tests/ikev1/dynamic-initiator/hosts/moon/etc/ipsec.conf
+++ b/testing/tests/ikev1/dynamic-initiator/hosts/moon/etc/ipsec.conf
@@ -12,6 +12,7 @@ conn %default
rekeymargin=3m
keyingtries=1
left=%defaultroute
+ leftnexthop=%direct
leftsubnet=10.1.0.0/16
leftsourceip=PH_IP_MOON1
leftcert=moonCert.pem
diff --git a/testing/tests/ikev1/dynamic-responder/hosts/carol/etc/ipsec.conf b/testing/tests/ikev1/dynamic-responder/hosts/carol/etc/ipsec.conf
index ba6f7bfe9..d8b885a88 100755
--- a/testing/tests/ikev1/dynamic-responder/hosts/carol/etc/ipsec.conf
+++ b/testing/tests/ikev1/dynamic-responder/hosts/carol/etc/ipsec.conf
@@ -14,6 +14,7 @@ conn %default
conn moon
left=%defaultroute
+ leftnexthop=%direct
leftsourceip=PH_IP_CAROL1
leftcert=carolCert.pem
leftid=carol@strongswan.org
diff --git a/testing/tests/ikev1/dynamic-responder/hosts/dave/etc/ipsec.conf b/testing/tests/ikev1/dynamic-responder/hosts/dave/etc/ipsec.conf
index ba6f7bfe9..d8b885a88 100755
--- a/testing/tests/ikev1/dynamic-responder/hosts/dave/etc/ipsec.conf
+++ b/testing/tests/ikev1/dynamic-responder/hosts/dave/etc/ipsec.conf
@@ -14,6 +14,7 @@ conn %default
conn moon
left=%defaultroute
+ leftnexthop=%direct
leftsourceip=PH_IP_CAROL1
leftcert=carolCert.pem
leftid=carol@strongswan.org
diff --git a/testing/tests/ikev1/dynamic-responder/hosts/moon/etc/ipsec.conf b/testing/tests/ikev1/dynamic-responder/hosts/moon/etc/ipsec.conf
index 2658293ac..bf39d7527 100755
--- a/testing/tests/ikev1/dynamic-responder/hosts/moon/etc/ipsec.conf
+++ b/testing/tests/ikev1/dynamic-responder/hosts/moon/etc/ipsec.conf
@@ -12,6 +12,7 @@ conn %default
rekeymargin=3m
keyingtries=1
left=%defaultroute
+ leftnexthop=%direct
leftsubnet=10.1.0.0/16
leftsourceip=PH_IP_MOON1
leftcert=moonCert.pem
diff --git a/testing/tests/ikev1/dynamic-two-peers/hosts/carol/etc/ipsec.conf b/testing/tests/ikev1/dynamic-two-peers/hosts/carol/etc/ipsec.conf
index 41123c9d6..1f964d0de 100755
--- a/testing/tests/ikev1/dynamic-two-peers/hosts/carol/etc/ipsec.conf
+++ b/testing/tests/ikev1/dynamic-two-peers/hosts/carol/etc/ipsec.conf
@@ -14,6 +14,7 @@ conn %default
conn moon
left=%defaultroute
+ leftnexthop=%direct
leftsourceip=PH_IP_CAROL1
leftcert=carolCert.pem
leftid=carol@strongswan.org
diff --git a/testing/tests/ikev1/dynamic-two-peers/hosts/dave/etc/ipsec.conf b/testing/tests/ikev1/dynamic-two-peers/hosts/dave/etc/ipsec.conf
index 2ba4db724..c098ffd90 100755
--- a/testing/tests/ikev1/dynamic-two-peers/hosts/dave/etc/ipsec.conf
+++ b/testing/tests/ikev1/dynamic-two-peers/hosts/dave/etc/ipsec.conf
@@ -14,6 +14,7 @@ conn %default
conn moon
left=%defaultroute
+ leftnexthop=%direct
leftsourceip=PH_IP_DAVE1
leftcert=daveCert.pem
leftid=dave@strongswan.org
diff --git a/testing/tests/ikev1/dynamic-two-peers/hosts/moon/etc/ipsec.conf b/testing/tests/ikev1/dynamic-two-peers/hosts/moon/etc/ipsec.conf
index 50c3a6a69..45ec8094b 100755
--- a/testing/tests/ikev1/dynamic-two-peers/hosts/moon/etc/ipsec.conf
+++ b/testing/tests/ikev1/dynamic-two-peers/hosts/moon/etc/ipsec.conf
@@ -12,6 +12,7 @@ conn %default
rekeymargin=3m
keyingtries=1
left=%defaultroute
+ leftnexthop=%direct
leftsubnet=10.1.0.0/16
leftsourceip=PH_IP_MOON1
leftcert=moonCert.pem
diff --git a/testing/tests/ikev1/passthrough/posttest.dat b/testing/tests/ikev1/passthrough/posttest.dat
index 5a9150bc8..db17f4c65 100644
--- a/testing/tests/ikev1/passthrough/posttest.dat
+++ b/testing/tests/ikev1/passthrough/posttest.dat
@@ -1,4 +1,6 @@
moon::ipsec stop
sun::ipsec stop
+moon::ip route flush table 50
+moon::ip rule del table 50
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
index 2606db192..6b5295469 100644
--- a/testing/tests/ikev1/passthrough/pretest.dat
+++ b/testing/tests/ikev1/passthrough/pretest.dat
@@ -2,6 +2,9 @@ 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::ip rule add pref 50 table 50
+moon::ip route add 192.168.0.254 via PH_IP_MOON table 50
+moon::ip route add 10.1.0.0/16 via PH_IP_MOON1 table 50
moon::ipsec start
sun::ipsec start
moon::sleep 2
diff --git a/testing/tests/ikev1/xauth-psk-mode-config/hosts/carol/etc/ipsec.secrets b/testing/tests/ikev1/xauth-psk-mode-config/hosts/carol/etc/ipsec.secrets
index 70ea1dab6..d2bba2f4c 100644
--- a/testing/tests/ikev1/xauth-psk-mode-config/hosts/carol/etc/ipsec.secrets
+++ b/testing/tests/ikev1/xauth-psk-mode-config/hosts/carol/etc/ipsec.secrets
@@ -1,5 +1,9 @@
# /etc/ipsec.secrets - strongSwan IPsec secrets file
-: PSK 0sv+NkxY9LLZvwj4qCC2o/gGrWDF2d21jL
+carol@strongswan.org @dave.strongswan.org : PSK 0sqc1FhzwoUSbpjYUSp8I6qUdxDacxLCTq
+
+carol@strongswan.org @moon.strongswan.org : PSK 0sv+NkxY9LLZvwj4qCC2o/gGrWDF2d21jL
+
+carol@strongswan.org @sun.strongswan.org : PSK 0sR64pR6y0S5d6d8rNhUIM7aPbdjND4st5
: XAUTH carol "4iChxLT3"
diff --git a/testing/tests/ikev2/config-payload-swapped/evaltest.dat b/testing/tests/ikev2/config-payload-swapped/evaltest.dat
index 40cb4339b..73d5ea206 100644
--- a/testing/tests/ikev2/config-payload-swapped/evaltest.dat
+++ b/testing/tests/ikev2/config-payload-swapped/evaltest.dat
@@ -1,11 +1,11 @@
carol::cat /var/log/daemon.log::installing new virtual IP PH_IP_CAROL1::YES
carol::ip addr list dev eth0::PH_IP_CAROL1::YES
-carol::ip route list dev eth0::10.1.0.0/16.*src PH_IP_CAROL1::YES
+carol::ip route list table 220::10.1.0.0/16.*src PH_IP_CAROL1::YES
carol::ipsec status::home.*INSTALLED::YES
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
dave::cat /var/log/daemon.log::installing new virtual IP PH_IP_DAVE1::YES
dave::ip addr list dev eth0::PH_IP_DAVE1::YES
-dave::ip route list dev eth0::10.1.0.0/16.*src PH_IP_DAVE1::YES
+dave::ip route list table 220::10.1.0.0/16.*src PH_IP_DAVE1::YES
dave::ipsec status::home.*INSTALLED::YES
dave::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
moon::ipsec status::rw-carol.*INSTALLED::YES
diff --git a/testing/tests/ikev2/config-payload/evaltest.dat b/testing/tests/ikev2/config-payload/evaltest.dat
index 40cb4339b..73d5ea206 100644
--- a/testing/tests/ikev2/config-payload/evaltest.dat
+++ b/testing/tests/ikev2/config-payload/evaltest.dat
@@ -1,11 +1,11 @@
carol::cat /var/log/daemon.log::installing new virtual IP PH_IP_CAROL1::YES
carol::ip addr list dev eth0::PH_IP_CAROL1::YES
-carol::ip route list dev eth0::10.1.0.0/16.*src PH_IP_CAROL1::YES
+carol::ip route list table 220::10.1.0.0/16.*src PH_IP_CAROL1::YES
carol::ipsec status::home.*INSTALLED::YES
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
dave::cat /var/log/daemon.log::installing new virtual IP PH_IP_DAVE1::YES
dave::ip addr list dev eth0::PH_IP_DAVE1::YES
-dave::ip route list dev eth0::10.1.0.0/16.*src PH_IP_DAVE1::YES
+dave::ip route list table 220::10.1.0.0/16.*src PH_IP_DAVE1::YES
dave::ipsec status::home.*INSTALLED::YES
dave::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
moon::ipsec status::rw-carol.*INSTALLED::YES
diff --git a/testing/tests/ikev2/force-udp-encaps/description.txt b/testing/tests/ikev2/force-udp-encaps/description.txt
new file mode 100644
index 000000000..a079363cf
--- /dev/null
+++ b/testing/tests/ikev2/force-udp-encaps/description.txt
@@ -0,0 +1,6 @@
+The roadwarrior <b>alice</b> sitting behind the NAT router <b>moon</b> sets up a tunnel to
+gateway <b>sun</b>. Since the firewall on <b>sun</b> blocks the ESP protocol, enforced UDP
+encapsulation (<b>forceencaps=yes</b>) is used by <b>alice</b> to punch through this hurdle.
+<b>leftfirewall=yes</b> automatically inserts iptables-based firewall rules that let pass
+the tunneled traffic. In order to test the tunnel, host <b>alice</b> pings the
+client <b>bob</b> behind the gateway <b>sun</b>.
diff --git a/testing/tests/ikev2/force-udp-encaps/evaltest.dat b/testing/tests/ikev2/force-udp-encaps/evaltest.dat
new file mode 100644
index 000000000..35f01d491
--- /dev/null
+++ b/testing/tests/ikev2/force-udp-encaps/evaltest.dat
@@ -0,0 +1,6 @@
+alice::cat /var/log/daemon.log::faking NAT situation to enforce UDP encapsulation::YES
+alice::ipsec statusall::nat-t.*INSTALLED::YES
+sun::ipsec statusall::nat-t.*INSTALLED::YES
+alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
+moon::tcpdump::IP alice.strongswan.org.* > sun.strongswan.org.ipsec-nat-t: UDP::YES
+moon::tcpdump::IP sun.strongswan.org.ipsec-nat-t > alice.strongswan.org.*: UDP::YES
diff --git a/testing/tests/ikev2/force-udp-encaps/hosts/alice/etc/ipsec.conf b/testing/tests/ikev2/force-udp-encaps/hosts/alice/etc/ipsec.conf
new file mode 100755
index 000000000..2074646cc
--- /dev/null
+++ b/testing/tests/ikev2/force-udp-encaps/hosts/alice/etc/ipsec.conf
@@ -0,0 +1,24 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+ crlcheckinterval=180
+ strictcrlpolicy=no
+ plutostart=no
+
+conn %default
+ ikelifetime=60m
+ keylife=20m
+ rekeymargin=3m
+ keyingtries=1
+ keyexchange=ikev2
+
+conn nat-t
+ left=%defaultroute
+ leftcert=aliceCert.pem
+ leftid=alice@strongswan.org
+ leftfirewall=yes
+ right=PH_IP_SUN
+ rightid=@sun.strongswan.org
+ rightsubnet=10.2.0.0/16
+ forceencaps=yes
+ auto=add
diff --git a/testing/tests/ikev2/force-udp-encaps/hosts/sun/etc/init.d/iptables b/testing/tests/ikev2/force-udp-encaps/hosts/sun/etc/init.d/iptables
new file mode 100755
index 000000000..5bb63f5ac
--- /dev/null
+++ b/testing/tests/ikev2/force-udp-encaps/hosts/sun/etc/init.d/iptables
@@ -0,0 +1,76 @@
+#!/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 IKE
+ iptables -A INPUT -i eth0 -p udp --dport 500 -j ACCEPT
+ iptables -A OUTPUT -o eth0 -p udp --sport 500 -j ACCEPT
+
+ # allow NAT-T
+ iptables -A INPUT -i eth0 -p udp --dport 4500 -j ACCEPT
+ iptables -A OUTPUT -o eth0 -p udp --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/ikev2/force-udp-encaps/hosts/sun/etc/ipsec.conf b/testing/tests/ikev2/force-udp-encaps/hosts/sun/etc/ipsec.conf
new file mode 100755
index 000000000..a2c168601
--- /dev/null
+++ b/testing/tests/ikev2/force-udp-encaps/hosts/sun/etc/ipsec.conf
@@ -0,0 +1,35 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+ crlcheckinterval=180
+ strictcrlpolicy=no
+ plutostart=no
+
+conn %default
+ ikelifetime=60m
+ keylife=20m
+ rekeymargin=3m
+ keyingtries=1
+ keyexchange=ikev2
+ left=PH_IP_SUN
+ leftcert=sunCert.pem
+ leftid=@sun.strongswan.org
+ leftfirewall=yes
+
+conn net-net
+ leftsubnet=10.2.0.0/16
+ right=PH_IP_MOON
+ rightsubnet=10.1.0.0/16
+ rightid=@moon.strongswan.org
+ auto=add
+
+conn host-host
+ right=PH_IP_MOON
+ rightid=@moon.strongswan.org
+ auto=add
+
+conn nat-t
+ leftsubnet=10.2.0.0/16
+ right=%any
+ rightsubnet=10.1.0.10/32
+ auto=add
diff --git a/testing/tests/ikev2/force-udp-encaps/posttest.dat b/testing/tests/ikev2/force-udp-encaps/posttest.dat
new file mode 100644
index 000000000..979f2fcd0
--- /dev/null
+++ b/testing/tests/ikev2/force-udp-encaps/posttest.dat
@@ -0,0 +1,6 @@
+alice::ipsec stop
+sun::ipsec stop
+alice::/etc/init.d/iptables stop 2> /dev/null
+sun::/etc/init.d/iptables stop 2> /dev/null
+sun::ip route del 10.1.0.0/16 via PH_IP_MOON
+winnetou::ip route del 10.1.0.0/16 via PH_IP_MOON
diff --git a/testing/tests/ikev2/force-udp-encaps/pretest.dat b/testing/tests/ikev2/force-udp-encaps/pretest.dat
new file mode 100644
index 000000000..6f00cd387
--- /dev/null
+++ b/testing/tests/ikev2/force-udp-encaps/pretest.dat
@@ -0,0 +1,11 @@
+alice::/etc/init.d/iptables start 2> /dev/null
+sun::/etc/init.d/iptables start 2> /dev/null
+sun::ip route add 10.1.0.0/16 via PH_IP_MOON
+winnetou::ip route add 10.1.0.0/16 via PH_IP_MOON
+moon::echo 1 > /proc/sys/net/ipv4/ip_forward
+alice::ipsec start
+sun::ipsec start
+alice::sleep 4
+alice::ipsec up nat-t
+alice::sleep 1
+
diff --git a/testing/tests/ikev2/force-udp-encaps/test.conf b/testing/tests/ikev2/force-udp-encaps/test.conf
new file mode 100644
index 000000000..d84149aaf
--- /dev/null
+++ b/testing/tests/ikev2/force-udp-encaps/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"
+
+# UML instances on which IPsec is started
+# Used for IPsec logging purposes
+#
+IPSECHOSTS="alice sun"
diff --git a/testing/tests/ikev2/mobike-nat/description.txt b/testing/tests/ikev2/mobike-nat/description.txt
index dd8a3a11a..ba8fc5bf0 100644
--- a/testing/tests/ikev2/mobike-nat/description.txt
+++ b/testing/tests/ikev2/mobike-nat/description.txt
@@ -4,4 +4,4 @@ via an additional <b>eth1</b> interface. <b>alice</b> builds up a tunnel to gate
in order to reach <b>bob</b> in the subnet behind. When the <b>eth1</b> interface
goes away, <b>alice</b> switches to <b>eth0</b> and signals the IP address change
via a MOBIKE ADDRESS_UPDATE notification to peer <b>sun</b>. <b>alice</b> sets
-a virtual IP of PH_IP_ALICE, so that the IPsec policies don't have to be changed.
+a virtual IP of 10.3.0.3, so that the IPsec policies don't have to be changed.
diff --git a/testing/tests/ikev2/mobike-nat/evaltest.dat b/testing/tests/ikev2/mobike-nat/evaltest.dat
index f6259cfb6..541b218d0 100644
--- a/testing/tests/ikev2/mobike-nat/evaltest.dat
+++ b/testing/tests/ikev2/mobike-nat/evaltest.dat
@@ -1,16 +1,16 @@
alice::ipsec statusall::ESTABLISHED.*PH_IP_ALICE1.*PH_IP_SUN::YES
sun::ipsec statusall::ESTABLISHED.*PH_IP_SUN.*PH_IP_ALICE1::YES
-alice::ipsec statusall::PH_IP_ALICE/32 === 10.2.0.0/16::YES
-sun::ipsec statusall::10.2.0.0/16 === PH_IP_ALICE/32::YES
+alice::ipsec statusall::10.3.0.3/32 === 10.2.0.0/16::YES
+sun::ipsec statusall::10.2.0.0/16 === 10.3.0.3/32::YES
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
alice::/etc/init.d/net.eth1 stop::No output expected::NO
alice::sleep 1::No output expected::NO
alice::ipsec statusall::ESTABLISHED.*PH_IP_ALICE.*PH_IP_SUN::YES
sun::ipsec statusall::ESTABLISHED.*PH_IP_SUN.*PH_IP_MOON::YES
-alice::ipsec statusall::PH_IP_ALICE/32 === 10.2.0.0/16::YES
-sun::ipsec statusall::10.2.0.0/16 === PH_IP_ALICE/32::YES
+alice::ipsec statusall::10.3.0.3/32 === 10.2.0.0/16::YES
+sun::ipsec statusall::10.2.0.0/16 === 10.3.0.3/32::YES
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
moon::tcpdump::moon.strongswan.org.*sun.strongswan.org.*: UDP-encap: ESP::YES
moon::tcpdump::sun.strongswan.org.*moon.strongswan.org.*: UDP-encap: ESP::YES
-bob::tcpdump::alice.strongswan.org.*bob.strongswan.org.*ICMP echo request::YES
-bob::tcpdump::bob.strongswan.org.*alice.strongswan.org.*ICMP echo reply::YES
+bob::tcpdump::10.3.0.3.*bob.strongswan.org.*ICMP echo request::YES
+bob::tcpdump::bob.strongswan.org.*10.3.0.3.*ICMP echo reply::YES
diff --git a/testing/tests/ikev2/mobike-nat/hosts/alice/etc/ipsec.conf b/testing/tests/ikev2/mobike-nat/hosts/alice/etc/ipsec.conf
index e05356b39..e9abfdac8 100755
--- a/testing/tests/ikev2/mobike-nat/hosts/alice/etc/ipsec.conf
+++ b/testing/tests/ikev2/mobike-nat/hosts/alice/etc/ipsec.conf
@@ -14,7 +14,7 @@ conn %default
conn mobike
left=PH_IP_ALICE1
- leftsourceip=PH_IP_ALICE
+ leftsourceip=10.3.0.3
leftcert=aliceCert.pem
leftid=alice@strongswan.org
leftfirewall=yes
diff --git a/testing/tests/ikev2/mobike-virtual-ip/description.txt b/testing/tests/ikev2/mobike-virtual-ip/description.txt
index 997c7f3e8..df5612727 100644
--- a/testing/tests/ikev2/mobike-virtual-ip/description.txt
+++ b/testing/tests/ikev2/mobike-virtual-ip/description.txt
@@ -4,4 +4,4 @@ via an additional <b>eth1</b> interface. <b>alice</b> builds up a tunnel to gate
in order to reach <b>bob</b> in the subnet behind. When the <b>eth1</b> interface
goes away, <b>alice</b> switches to <b>eth0</b> and signals the IP address change
via a MOBIKE ADDRESS_UPDATE notification to peer <b>sun</b>. <b>alice</b> sets
-a virtual IP of PH_IP_ALICE, so that the IPsec policies don't have to be changed.
+a virtual IP of 10.3.0.3, so that the IPsec policies don't have to be changed.
diff --git a/testing/tests/ikev2/mobike-virtual-ip/evaltest.dat b/testing/tests/ikev2/mobike-virtual-ip/evaltest.dat
index 482cef866..5be507d2e 100644
--- a/testing/tests/ikev2/mobike-virtual-ip/evaltest.dat
+++ b/testing/tests/ikev2/mobike-virtual-ip/evaltest.dat
@@ -1,16 +1,16 @@
alice::ipsec statusall::ESTABLISHED.*PH_IP_ALICE1.*PH_IP_SUN::YES
sun::ipsec statusall::ESTABLISHED.*PH_IP_SUN.*PH_IP_ALICE1::YES
-alice::ipsec statusall::PH_IP_ALICE/32 === 10.2.0.0/16::YES
-sun::ipsec statusall::10.2.0.0/16 === PH_IP_ALICE/32::YES
+alice::ipsec statusall::10.3.0.3/32 === 10.2.0.0/16::YES
+sun::ipsec statusall::10.2.0.0/16 === 10.3.0.3/32::YES
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
alice::/etc/init.d/net.eth1 stop::No output expected::NO
alice::sleep 1::No output expected::NO
alice::ipsec statusall::ESTABLISHED.*PH_IP_ALICE.*PH_IP_SUN::YES
sun::ipsec statusall::ESTABLISHED.*PH_IP_SUN.*PH_IP_ALICE::YES
-alice::ipsec statusall::PH_IP_ALICE/32 === 10.2.0.0/16::YES
-sun::ipsec statusall::10.2.0.0/16 === PH_IP_ALICE/32::YES
+alice::ipsec statusall::10.3.0.3/32 === 10.2.0.0/16::YES
+sun::ipsec statusall::10.2.0.0/16 === 10.3.0.3/32::YES
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
moon::tcpdump::alice.strongswan.org.*sun.strongswan.org.*: ESP::YES
moon::tcpdump::sun.strongswan.org.*alice.strongswan.org.*: ESP::YES
-bob::tcpdump::alice.strongswan.org.*bob.strongswan.org.*ICMP echo request::YES
-bob::tcpdump::bob.strongswan.org.*alice.strongswan.org.*ICMP echo reply::YES
+bob::tcpdump::10.3.0.3.*bob.strongswan.org.*ICMP echo request::YES
+bob::tcpdump::bob.strongswan.org.*10.3.0.3.*ICMP echo reply::YES
diff --git a/testing/tests/ikev2/mobike-virtual-ip/hosts/alice/etc/ipsec.conf b/testing/tests/ikev2/mobike-virtual-ip/hosts/alice/etc/ipsec.conf
index e05356b39..e9abfdac8 100755
--- a/testing/tests/ikev2/mobike-virtual-ip/hosts/alice/etc/ipsec.conf
+++ b/testing/tests/ikev2/mobike-virtual-ip/hosts/alice/etc/ipsec.conf
@@ -14,7 +14,7 @@ conn %default
conn mobike
left=PH_IP_ALICE1
- leftsourceip=PH_IP_ALICE
+ leftsourceip=10.3.0.3
leftcert=aliceCert.pem
leftid=alice@strongswan.org
leftfirewall=yes
diff --git a/testing/tests/ikev2/nat-two-rw/evaltest.dat b/testing/tests/ikev2/nat-two-rw/evaltest.dat
index 28d5b5289..bd0a4b52b 100644
--- a/testing/tests/ikev2/nat-two-rw/evaltest.dat
+++ b/testing/tests/ikev2/nat-two-rw/evaltest.dat
@@ -2,7 +2,7 @@ alice::ipsec statusall::nat-t.*INSTALLED::YES
venus::ipsec statusall::nat-t.*INSTALLED::YES
sun::ipsec statusall::nat-t.*INSTALLED::YES
sun::ipsec status::alice@strongswan.org::YES
-sun::ipsec status::@venus.strongswan.org::YES
+sun::ipsec status::venus.strongswan.org::YES
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
venus::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
moon::tcpdump::IP moon.strongswan.org.* > sun.strongswan.org.ipsec-nat-t: UDP::YES
diff --git a/testing/tests/ikev2/net2net-cert/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/net2net-cert/hosts/moon/etc/ipsec.conf
index e86ed4f72..562f26826 100755
--- a/testing/tests/ikev2/net2net-cert/hosts/moon/etc/ipsec.conf
+++ b/testing/tests/ikev2/net2net-cert/hosts/moon/etc/ipsec.conf
@@ -11,6 +11,7 @@ conn %default
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
+ mobike=no
conn net-net
left=PH_IP_MOON
diff --git a/testing/tests/ikev2/net2net-cert/hosts/sun/etc/ipsec.conf b/testing/tests/ikev2/net2net-cert/hosts/sun/etc/ipsec.conf
index ea55d2edb..24e5df519 100755
--- a/testing/tests/ikev2/net2net-cert/hosts/sun/etc/ipsec.conf
+++ b/testing/tests/ikev2/net2net-cert/hosts/sun/etc/ipsec.conf
@@ -11,6 +11,7 @@ conn %default
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
+ mobike=no
conn net-net
left=PH_IP_SUN
diff --git a/testing/tests/ikev2/net2net-psk/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/net2net-psk/hosts/moon/etc/ipsec.conf
index 55fe84bc3..15d8ddb11 100755
--- a/testing/tests/ikev2/net2net-psk/hosts/moon/etc/ipsec.conf
+++ b/testing/tests/ikev2/net2net-psk/hosts/moon/etc/ipsec.conf
@@ -10,7 +10,8 @@ conn %default
keyingtries=1
authby=secret
keyexchange=ikev2
-
+ mobike=no
+
conn net-net
left=PH_IP_MOON
leftsubnet=10.1.0.0/16
diff --git a/testing/tests/ikev2/net2net-psk/hosts/sun/etc/ipsec.conf b/testing/tests/ikev2/net2net-psk/hosts/sun/etc/ipsec.conf
index 063f23b29..e145d9974 100755
--- a/testing/tests/ikev2/net2net-psk/hosts/sun/etc/ipsec.conf
+++ b/testing/tests/ikev2/net2net-psk/hosts/sun/etc/ipsec.conf
@@ -10,7 +10,8 @@ conn %default
keyingtries=1
authby=secret
keyexchange=ikev2
-
+ mobike=no
+
conn net-net
left=PH_IP_SUN
leftsubnet=10.2.0.0/16
diff --git a/testing/tests/ikev2/net2net-route/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/net2net-route/hosts/moon/etc/ipsec.conf
index fe75ede89..8a2f8b77c 100755
--- a/testing/tests/ikev2/net2net-route/hosts/moon/etc/ipsec.conf
+++ b/testing/tests/ikev2/net2net-route/hosts/moon/etc/ipsec.conf
@@ -11,6 +11,7 @@ conn %default
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
+ mobike=no
conn net-net
left=PH_IP_MOON
diff --git a/testing/tests/ikev2/net2net-route/hosts/sun/etc/ipsec.conf b/testing/tests/ikev2/net2net-route/hosts/sun/etc/ipsec.conf
index ea55d2edb..24e5df519 100755
--- a/testing/tests/ikev2/net2net-route/hosts/sun/etc/ipsec.conf
+++ b/testing/tests/ikev2/net2net-route/hosts/sun/etc/ipsec.conf
@@ -11,6 +11,7 @@ conn %default
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
+ mobike=no
conn net-net
left=PH_IP_SUN
diff --git a/testing/tests/ikev2/net2net-start/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/net2net-start/hosts/moon/etc/ipsec.conf
index 77abdcdd1..1cc812864 100755
--- a/testing/tests/ikev2/net2net-start/hosts/moon/etc/ipsec.conf
+++ b/testing/tests/ikev2/net2net-start/hosts/moon/etc/ipsec.conf
@@ -11,6 +11,7 @@ conn %default
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
+ mobike=no
conn net-net
left=PH_IP_MOON
diff --git a/testing/tests/ikev2/net2net-start/hosts/sun/etc/ipsec.conf b/testing/tests/ikev2/net2net-start/hosts/sun/etc/ipsec.conf
index ea55d2edb..24e5df519 100755
--- a/testing/tests/ikev2/net2net-start/hosts/sun/etc/ipsec.conf
+++ b/testing/tests/ikev2/net2net-start/hosts/sun/etc/ipsec.conf
@@ -11,6 +11,7 @@ conn %default
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
+ mobike=no
conn net-net
left=PH_IP_SUN
diff --git a/testing/tests/ikev2/rw-psk-rsa-mixed/evaltest.dat b/testing/tests/ikev2/rw-psk-rsa-mixed/evaltest.dat
index f7f9dc51d..1ce38fc6a 100644
--- a/testing/tests/ikev2/rw-psk-rsa-mixed/evaltest.dat
+++ b/testing/tests/ikev2/rw-psk-rsa-mixed/evaltest.dat
@@ -3,7 +3,7 @@ moon::cat /var/log/daemon.log::authentication of 'PH_IP_MOON' (myself) with pre-
moon::ipsec statusall::rw-psk.*INSTALLED::YES
carol::ipsec statusall::home.*ESTABLISHED::YES
moon::cat /var/log/daemon.log::authentication of 'dave@strongswan.org' with RSA signature successful::YES
-moon::cat /var/log/daemon.log::authentication of '@moon.strongswan.org' (myself) with RSA signature::YES
+moon::cat /var/log/daemon.log::authentication of 'moon.strongswan.org' (myself) with RSA signature::YES
moon::ipsec statusall::rw-rsasig.*INSTALLED::YES
dave::ipsec statusall::home.*ESTABLISHED::YES
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
diff --git a/testing/tests/ikev2/rw-psk-rsa-split/evaltest.dat b/testing/tests/ikev2/rw-psk-rsa-split/evaltest.dat
index c0fd8b16b..8c7d2e9ea 100644
--- a/testing/tests/ikev2/rw-psk-rsa-split/evaltest.dat
+++ b/testing/tests/ikev2/rw-psk-rsa-split/evaltest.dat
@@ -1,6 +1,6 @@
moon::cat /var/log/daemon.log::authentication of 'carol@strongswan.org' with pre-shared key successful::YES
moon::cat /var/log/daemon.log::authentication of 'dave@strongswan.org' with pre-shared key successful::YES
-moon::cat /var/log/daemon.log::authentication of '@moon.strongswan.org' (myself) with RSA signature::YES
+moon::cat /var/log/daemon.log::authentication of 'moon.strongswan.org' (myself) with RSA signature::YES
moon::ipsec statusall::rw.*INSTALLED::YES
carol::ipsec statusall::home.*ESTABLISHED::YES
dave::ipsec statusall::home.*ESTABLISHED::YES
diff --git a/testing/tests/ikev2/virtual-ip-override/evaltest.dat b/testing/tests/ikev2/virtual-ip-override/evaltest.dat
index 5216a53bb..34ccb76ca 100644
--- a/testing/tests/ikev2/virtual-ip-override/evaltest.dat
+++ b/testing/tests/ikev2/virtual-ip-override/evaltest.dat
@@ -7,7 +7,7 @@ moon::cat /var/log/daemon.log::peer requested virtual IP PH_IP_DAVE1::NO
moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_CAROL1 to peer::YES
moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_DAVE1 to peer::YES
carol::ip addr list dev eth0::PH_IP_CAROL1::YES
-carol::ip route list dev eth0::src PH_IP_CAROL1::YES
+carol::ip route list table 220::src PH_IP_CAROL1::YES
dave::ip addr list dev eth0::PH_IP_DAVE1::YES
-dave::ip route list dev eth0::src PH_IP_DAVE1::YES
+dave::ip route list table 220::src PH_IP_DAVE1::YES
diff --git a/testing/tests/ikev2/virtual-ip/evaltest.dat b/testing/tests/ikev2/virtual-ip/evaltest.dat
index dbb873ebc..e3c3c7f3c 100644
--- a/testing/tests/ikev2/virtual-ip/evaltest.dat
+++ b/testing/tests/ikev2/virtual-ip/evaltest.dat
@@ -7,9 +7,9 @@ moon::cat /var/log/daemon.log::peer requested virtual IP PH_IP_DAVE1::YES
moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_CAROL1 to peer::YES
moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_DAVE1 to peer::YES
carol::ip addr list dev eth0::PH_IP_CAROL1::YES
-carol::ip route list dev eth0::src PH_IP_CAROL1::YES
+carol::ip route list table 220::src PH_IP_CAROL1::YES
dave::ip addr list dev eth0::PH_IP_DAVE1::YES
-dave::ip route list dev eth0::src PH_IP_DAVE1::YES
+dave::ip route list table 220::src PH_IP_DAVE1::YES
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
carol::ping -c 1 PH_IP_MOON1::64 bytes from PH_IP_MOON1: icmp_seq=1::YES
dave::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES