testing: Added legacy ipv6-stroke scenarios

This commit is contained in:
Andreas Steffen
2017-11-11 16:41:15 +01:00
parent 4402013f05
commit 65f74cd13d
172 changed files with 2418 additions and 0 deletions
@@ -0,0 +1,5 @@
An IPv6 ESP connection between the hosts <b>moon</b> and <b>sun</b> is successfully set up.
The authentication is based on X.509 certificates. Upon the successful establishment of
the IPsec tunnel, <b>leftfirewall=yes</b> automatically inserts ip6tables-based firewall
rules that let pass the tunneled traffic. In order to test both the host-to-host tunnel
and the firewall rules, <b>moon</b> sends an IPv6 ICMP request to <b>sun</b> using the ping6 command.
@@ -0,0 +1,7 @@
moon::ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
sun:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
moon::ipsec status 2> /dev/null::host-host.*INSTALLED, TUNNEL::YES
sun:: ipsec status 2> /dev/null::host-host.*INSTALLED, TUNNEL::YES
moon::ping6 -c 1 -p deadbeef ip6-sun.strongswan.org::64 bytes from ip6-sun.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
@@ -0,0 +1,31 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
ca strongswan
cacert=strongswanCert.pem
certuribase=http://ip6-winnetou.strongswan.org/certs/
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
auto=add
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
[email protected]
leftfirewall=yes
right=PH_IP6_SUN
[email protected]
auto=add
@@ -0,0 +1,5 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation hmac stroke kernel-netlink socket-default updown
}
@@ -0,0 +1,30 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
ca strongswan
cacert=strongswanCert.pem
certuribase=http://ip6-winnetou.strongswan.org/certs/
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
auto=add
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
[email protected]
leftfirewall=yes
right=PH_IP6_MOON
[email protected]
auto=add
@@ -0,0 +1,5 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation hmac stroke kernel-netlink socket-default updown
}
@@ -0,0 +1,6 @@
moon::ipsec stop
sun::ipsec stop
moon::iptables-restore < /etc/iptables.flush
sun::iptables-restore < /etc/iptables.flush
moon::ip6tables-restore < /etc/ip6tables.flush
sun::ip6tables-restore < /etc/ip6tables.flush
@@ -0,0 +1,9 @@
moon::iptables-restore < /etc/iptables.drop
sun::iptables-restore < /etc/iptables.drop
moon::ip6tables-restore < /etc/ip6tables.rules
sun::ip6tables-restore < /etc/ip6tables.rules
moon::ipsec start
sun::ipsec start
moon::expect-connection host-host
sun::expect-connection host-host
moon::ipsec up host-host
@@ -0,0 +1,25 @@
#!/bin/bash
#
# This configuration file provides information on the
# guest instances used for this test
# All guest instances that are required for this test
#
VIRTHOSTS="moon winnetou sun"
# Corresponding block diagram
#
DIAGRAM="m-w-s-ip6.png"
# Guest instances on which tcpdump is to be started
#
TCPDUMPHOSTS="sun"
# Guest instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon sun"
# IP protocol used by IPsec is IPv6
#
IPV6=1