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 @@
|
||||
An IPsec <b>transport-mode</b> connection between the natted host <b>alice</b>
|
||||
and gateway <b>sun</b> is successfully set up. The client <b>venus</b> behind
|
||||
the same NAT as client <b>alice</b> also establishes the same <b>transport-mode</b>
|
||||
connection. <b>sun</b> uses the connmark plugin and a <b>%unique</b> mark on
|
||||
the CHILD_SAs to select the correct return path SA using connection tracking.
|
||||
This allows <b>sun</b> to talk to both nodes for client initiated flows, even
|
||||
if the SAs are actually both over <b>moon</b>.<br/>
|
||||
To test the connection, both hosts establish an SSH connection to <b>sun</b>.
|
||||
@@ -0,0 +1,8 @@
|
||||
sun:: ipsec status 2> /dev/null::nat-t.*ESTABLISHED.*sun.strongswan.org.*venus.strongswan.org::YES
|
||||
sun:: ipsec status 2> /dev/null::nat-t.*ESTABLISHED.*sun.strongswan.org.*[email protected]::YES
|
||||
alice::ipsec status 2> /dev/null::nat-t.*INSTALLED, TRANSPORT, reqid 1::YES
|
||||
venus::ipsec status 2> /dev/null::nat-t.*INSTALLED, TRANSPORT, reqid 1::YES
|
||||
alice::ssh 192.168.0.2 'echo alice-echo && exit'::alice-echo::YES
|
||||
venus::ssh 192.168.0.2 'echo venus-echo && exit'::venus-echo::YES
|
||||
sun::iptables -t mangle -L -n -v
|
||||
sun::conntrack -L
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||
|
||||
config setup
|
||||
|
||||
conn %default
|
||||
ikelifetime=60m
|
||||
keylife=20m
|
||||
rekeymargin=3m
|
||||
keyingtries=1
|
||||
|
||||
conn nat-t
|
||||
leftcert=aliceCert.pem
|
||||
[email protected]
|
||||
right=192.168.0.2
|
||||
[email protected]
|
||||
type=transport
|
||||
auto=add
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
# /etc/strongswan.conf - strongSwan configuration file
|
||||
|
||||
charon {
|
||||
load = random nonce aes sha1 sha2 hmac pem pkcs1 x509 revocation pubkey curve25519 gmp curl kernel-netlink socket-default updown stroke
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||
|
||||
config setup
|
||||
|
||||
conn %default
|
||||
ikelifetime=60m
|
||||
keylife=20m
|
||||
rekeymargin=3m
|
||||
keyingtries=1
|
||||
left=192.168.0.2
|
||||
leftcert=sunCert.pem
|
||||
[email protected]
|
||||
|
||||
conn nat-t
|
||||
right=%any
|
||||
type=transport
|
||||
mark=%unique
|
||||
auto=add
|
||||
+5
@@ -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 connmark
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||
|
||||
config setup
|
||||
|
||||
conn %default
|
||||
ikelifetime=60m
|
||||
keylife=20m
|
||||
rekeymargin=3m
|
||||
keyingtries=1
|
||||
|
||||
conn nat-t
|
||||
leftcert=venusCert.pem
|
||||
[email protected]
|
||||
right=192.168.0.2
|
||||
[email protected]
|
||||
type=transport
|
||||
auto=add
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
# /etc/strongswan.conf - strongSwan configuration file
|
||||
|
||||
charon {
|
||||
load = random nonce aes sha1 sha2 hmac pem pkcs1 x509 revocation pubkey curve25519 gmp curl kernel-netlink socket-default updown stroke
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
alice::ipsec stop
|
||||
venus::ipsec stop
|
||||
sun::ipsec stop
|
||||
moon::iptables-restore < /etc/iptables.flush
|
||||
sun::iptables-restore < /etc/iptables.flush
|
||||
@@ -0,0 +1,12 @@
|
||||
moon::iptables-restore < /etc/iptables.rules
|
||||
moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -j MASQUERADE
|
||||
moon::iptables -A FORWARD -i eth1 -o eth0 -s 10.1.0.0/16 -j ACCEPT
|
||||
moon::iptables -A FORWARD -i eth0 -o eth1 -d 10.1.0.0/16 -j ACCEPT
|
||||
sun::ipsec start
|
||||
alice::ipsec start
|
||||
venus::ipsec start
|
||||
sun::expect-connection nat-t
|
||||
alice::expect-connection nat-t
|
||||
alice::ipsec up nat-t
|
||||
venus::expect-connection nat-t
|
||||
venus::ipsec up nat-t
|
||||
@@ -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 winnetou sun"
|
||||
|
||||
# Corresponding block diagram
|
||||
#
|
||||
DIAGRAM="a-m-w-s-b.png"
|
||||
|
||||
# Guest instances on which tcpdump is to be started
|
||||
#
|
||||
TCPDUMPHOSTS="sun alice venus moon"
|
||||
|
||||
# Guest instances on which IPsec is started
|
||||
# Used for IPsec logging purposes
|
||||
#
|
||||
IPSECHOSTS="alice venus sun"
|
||||
Reference in New Issue
Block a user