testing: Reorganizing IKEv1 and IKEv2 examples

For documentation purposes the new folders ikev1-algs, ikev2-algs,
ikev1-multi-ca and ikev2-multi-ca have been created. Most of the
test cases have now been converted to the vici interface. The
remaining legacy stroke scenarios yet to be converted have been put
into the ikev2-stroke-bye folder.

For documentation purposes some legacy stroke scenarios will be kept
in the ikev1-stroke, ikev2-stroke and ipv6-stroke folders.
This commit is contained in:
Andreas Steffen
2021-05-21 09:42:50 +02:00
parent db93938297
commit 7c5a2974b9
4054 changed files with 16375 additions and 15209 deletions
@@ -0,0 +1,8 @@
The roadwarriors <b>carol</b> and <b>dave</b> set up a connection each to
gateway <b>moon</b> and request a <b>virtual IP</b>. <b>moon</b> negotiates
broadcast and multicast traffic selectors with the clients, and uses
<i>%unique</i> marks to avoid any policy conflicts. The enabled <i>forecast</i>
plugin on <b>moon</b> installs the required Netfilter rules to make use of these
policies, and additionally starts forwarding broadcast and multicast packets
between the clients.<br/>
To test forwarding, the hosts send multicast and broadcast ping messages.
@@ -0,0 +1,20 @@
carol::ipsec status 2> /dev/null::home.*ESTABLISHED.*[email protected].*moon.strongswan.org::YES
carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
dave:: ipsec status 2> /dev/null::home.*ESTABLISHED.*[email protected].*moon.strongswan.org::YES
dave:: ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
moon:: ipsec status 2> /dev/null::rw.*ESTABLISHED.*moon.strongswan.org.*[email protected]::YES
moon:: ipsec status 2> /dev/null::rw.*ESTABLISHED.*moon.strongswan.org.*[email protected]::YES
moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL, reqid 1::YES
moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL, reqid 2::YES
alice::ping -W 1 -c 1 239.0.0.1 2>&1> /dev/null
carol::ping -W 1 -c 1 239.0.0.2 2>&1> /dev/null
dave::ping -W 1 -c 1 239.0.0.3 2>&1> /dev/null
carol::ping -W 1 -c 1 -b 10.1.255.255 2>&1> /dev/null
dave::ping -W 1 -c 1 -b 10.1.255.255 2>&1> /dev/null
moon::iptables -t mangle -L -n -v
carol::tcpdump::IP alice.strongswan.org > 239.0.0.1: ICMP echo request::YES
dave::tcpdump::IP alice.strongswan.org > 239.0.0.1: ICMP echo request::YES
carol::tcpdump::IP 10.1.0.130 > 239.0.0.3: ICMP echo request::YES
dave::tcpdump::IP 10.1.0.129 > 239.0.0.2: ICMP echo request::YES
carol::tcpdump::IP 10.1.0.130 > 10.1.255.255: ICMP echo request::YES
dave::tcpdump::IP 10.1.0.129 > 10.1.255.255: ICMP echo request::YES
@@ -0,0 +1,21 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn home
left=PH_IP_CAROL
leftsourceip=%config
leftsubnet=0.0.0.0/0
leftcert=carolCert.pem
[email protected]
right=PH_IP_MOON
rightsubnet=0.0.0.0/0
[email protected]
auto=add
@@ -0,0 +1,5 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = random nonce aes sha1 sha2 md5 pem pkcs1 curve25519 gmp x509 curl revocation hmac stroke kernel-netlink socket-default updown resolve
}
@@ -0,0 +1,21 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn home
left=PH_IP_DAVE
leftsourceip=%config
leftsubnet=0.0.0.0/0
leftcert=daveCert.pem
[email protected]
right=PH_IP_MOON
rightsubnet=0.0.0.0/0
[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 resolve
}
@@ -0,0 +1,22 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn rw
left=PH_IP_MOON
leftcert=moonCert.pem
[email protected]
leftsubnet=10.1.0.0/16,224.0.0.0/4
right=%any
rightid=*@strongswan.org
rightsourceip=10.1.0.128/26
rightsubnet=%dynamic,224.0.0.0/4,10.1.255.255
mark=%unique
auto=add
@@ -0,0 +1,17 @@
# /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 attr forecast
syslog {
daemon {
net = 2
}
}
plugins {
forecast {
interface = eth1
reinject = rw
}
}
}
@@ -0,0 +1,6 @@
moon::ipsec stop
carol::ipsec stop
dave::ipsec stop
moon::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
dave::iptables-restore < /etc/iptables.flush
@@ -0,0 +1,8 @@
moon::ipsec start
carol::ipsec start
dave::ipsec start
moon::expect-connection rw
carol::expect-connection home
carol::ipsec up home
dave::expect-connection home
dave::ipsec up home
@@ -0,0 +1,21 @@
#!/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="alice moon carol winnetou dave"
# Corresponding block diagram
#
DIAGRAM="a-m-c-w-d.png"
# Guest instances on which tcpdump is to be started
#
TCPDUMPHOSTS="moon carol dave"
# Guest instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon carol dave"