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:
@@ -0,0 +1,8 @@
|
||||
Using the <b>left|rightprotoport</b> selectors, two IPsec tunnels
|
||||
between the roadwarrior <b>carol</b> and the gateway <b>moon</b> are
|
||||
defined. The first IPsec SA is restricted to ICMP packets and the second
|
||||
covers TCP-based SSH connections. Using <b>add=route</b> %trap
|
||||
eroutes for these IPsec SAs are prepared on <b>carol</b>. By sending
|
||||
a ping to the client <b>alice</b> behind <b>moon</b>, the ICMP eroute
|
||||
is triggered and the corresponding IPsec tunnel is set up. In the same
|
||||
way an ssh session to <b>alice</b> over the second IPsec SA is established.
|
||||
@@ -0,0 +1,10 @@
|
||||
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_.eq::YES
|
||||
carol::ping -c 1 PH_IP_MOON1::64 bytes from PH_IP_MOON1: icmp_.eq::YES
|
||||
carol::ssh PH_IP_ALICE hostname::alice::YES
|
||||
carol::cat /var/log/daemon.log::creating acquire job::YES
|
||||
carol::ipsec status 2> /dev/null::home-icmp.*INSTALLED::YES
|
||||
carol::ipsec status 2> /dev/null::home-ssh.*INSTALLED::YES
|
||||
moon:: ipsec status 2> /dev/null::rw-icmp.*INSTALLED::YES
|
||||
moon:: ipsec status 2> /dev/null::rw-ssh.*INSTALLED::YES
|
||||
moon::tcpdump::IP carol.strongswan.org > moon.strongswan.org: ESP::YES
|
||||
moon::tcpdump::IP moon.strongswan.org > carol.strongswan.org: ESP::YES
|
||||
@@ -0,0 +1,26 @@
|
||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||
|
||||
config setup
|
||||
|
||||
conn %default
|
||||
ikelifetime=60m
|
||||
keylife=20m
|
||||
rekeymargin=3m
|
||||
keyingtries=1
|
||||
keyexchange=ikev2
|
||||
left=PH_IP_CAROL
|
||||
leftcert=carolCert.pem
|
||||
[email protected]
|
||||
leftfirewall=yes
|
||||
right=PH_IP_MOON
|
||||
rightsubnet=10.1.0.0/16
|
||||
[email protected]
|
||||
auto=route
|
||||
|
||||
conn home-icmp
|
||||
leftprotoport=icmp
|
||||
rightprotoport=icmp
|
||||
|
||||
conn home-ssh
|
||||
leftprotoport=tcp
|
||||
rightprotoport=tcp/ssh
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||
|
||||
config setup
|
||||
|
||||
conn %default
|
||||
ikelifetime=60m
|
||||
keylife=20m
|
||||
rekeymargin=3m
|
||||
keyingtries=1
|
||||
keyexchange=ikev2
|
||||
left=PH_IP_MOON
|
||||
leftcert=moonCert.pem
|
||||
[email protected]
|
||||
leftfirewall=yes
|
||||
leftsubnet=10.1.0.0/16
|
||||
right=%any
|
||||
auto=add
|
||||
|
||||
conn rw-icmp
|
||||
lefthostaccess=yes
|
||||
leftprotoport=icmp
|
||||
rightprotoport=icmp
|
||||
|
||||
conn rw-ssh
|
||||
leftprotoport=tcp/ssh
|
||||
rightprotoport=tcp
|
||||
@@ -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,4 @@
|
||||
moon::ipsec stop
|
||||
carol::ipsec stop
|
||||
moon::iptables-restore < /etc/iptables.flush
|
||||
carol::iptables-restore < /etc/iptables.flush
|
||||
@@ -0,0 +1,10 @@
|
||||
moon::iptables-restore < /etc/iptables.rules
|
||||
carol::iptables-restore < /etc/iptables.rules
|
||||
moon::ipsec start
|
||||
carol::ipsec start
|
||||
moon::expect-connection rw-icmp
|
||||
moon::expect-connection rw-ssh
|
||||
carol::expect-connection home-icmp
|
||||
carol::expect-connection home-ssh
|
||||
carol::ssh PH_IP_ALICE hostname
|
||||
carol::ping -W 1 -c 1 PH_IP_ALICE > /dev/null
|
||||
@@ -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"
|
||||
|
||||
# Corresponding block diagram
|
||||
#
|
||||
DIAGRAM="a-m-c-w.png"
|
||||
|
||||
# Guest instances on which tcpdump is to be started
|
||||
#
|
||||
TCPDUMPHOSTS="moon"
|
||||
|
||||
# Guest instances on which IPsec is started
|
||||
# Used for IPsec logging purposes
|
||||
#
|
||||
IPSECHOSTS="moon carol"
|
||||
Reference in New Issue
Block a user