tests with subdirectory structure

This commit is contained in:
Andreas Steffen
2006-07-03 07:11:30 +00:00
parent 92069df82f
commit 6db2ac30c7
607 changed files with 9414 additions and 0 deletions
@@ -0,0 +1,4 @@
By setting <b>strictcrlpolicy=yes</b> a <b>strict CRL policy</b> is enforced on
both roadwarrior <b>carol</b> and gateway <b>moon</b>. <b>carol</b> initiates
the connection and presents a certificate that has been revoked by the
current CRL.Therefore the IKE negotiation fails
@@ -0,0 +1,6 @@
moon::cat /var/log/auth.log::certificate was revoked::YES
moon::cat /var/log/auth.log::end entity certificate is not trusted::YES
carol::cat /var/log/auth.log::AUTHENTICATION_FAILED::YES
moon::ipsec listcrls:: ok::YES
moon::ipsec status::rw.*STATE_MAIN_R3.*ISAKMP SA established::NO
carol::ipsec status::home.*STATE_MAIN_I4.*ISAKMP SA established::NO
+22
View File
@@ -0,0 +1,22 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=yes
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn home
left=PH_IP_CAROL
leftnexthop=%direct
leftcert=carolRevokedCert.pem
[email protected]
right=PH_IP_MOON
rightsubnet=10.1.0.0/16
[email protected]
keyexchange=ikev2
auto=add
@@ -0,0 +1,25 @@
-----BEGIN CERTIFICATE-----
MIIEIjCCAwqgAwIBAgIBBzANBgkqhkiG9w0BAQQFADBFMQswCQYDVQQGEwJDSDEZ
MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS
b290IENBMB4XDTA0MDkxMDExMjU0OFoXDTA5MDkwOTExMjU0OFowWjELMAkGA1UE
BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xETAPBgNVBAsTCFJlc2Vh
cmNoMR0wGwYDVQQDFBRjYXJvbEBzdHJvbmdzd2FuLm9yZzCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAM5413q1B2EF3spcYD1u0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bPq6DQXCJ8pf
IF37AEqAY4UNSNic0Cw+rGHdWPQhDNXhFWpdu7kCgYEAmv4oNmyoDXbuhrlsbggi
CXE9TbG3a3mm8dPOGf2yHBmf7R2i/6GtNW33Kw1KIwfBV77WpQEGZwWACsv8ONx3
baUSiHTfpkfk5xQQ5w/tRMISfTuB4agD0jJFnLa7qXl2ZhY2S53aSVsdntDOhi+R
TEy1umah2Za8Xbd0RgHwcn0CgYEAl9Hgg9dfikMIaNVm6W/4cCtxoojy2Sf3LIlP
r1oDsH6JmBwsdJjuJ4ZNhoXJNqID2COuDgTEly7U+jf4gFvEGuT7JPw6tgy/Ln7i
jTVCpaozX08oykpVUEhDirYQ8fyLFaGbEqQQCcUusej59G/IlW0F2F6QoFrEwUaH
46R4EQECgYBEZ7edMkj3dmJH1wxQjp5GJNbrJkS8IKvzza0mDTJdz33CgEX9Oyva
o2iEkDVpvj2SEy28ewt22IRptWKH/3bQfxSCcRV6JFNt3+LongMshRYqq1leqrKa
9fnQVtfTIbIVXwjTZap6BL8R66OeFtexsSFRfDF/8P4n2oF4zmn4qA==
-----END RSA PRIVATE KEY-----
@@ -0,0 +1,3 @@
# /etc/ipsec.secrets - strongSwan IPsec secrets file
: RSA carolRevokedKey.pem
+21
View File
@@ -0,0 +1,21 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=yes
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn rw
left=PH_IP_MOON
leftnexthop=%direct
leftcert=moonCert.pem
[email protected]
leftsubnet=10.1.0.0/16
right=%any
keyexchange=ikev2
auto=add
@@ -0,0 +1,5 @@
moon::ipsec stop
carol::ipsec stop
carol::rm /etc/ipsec.d/private/*
carol::rm /etc/ipsec.d/certs/*
moon::rm /etc/ipsec.d/crls/*
@@ -0,0 +1,6 @@
moon::wget -q http://crl.strongswan.org/strongswan.crl -O /etc/ipsec.d/crls/strongswan.crl
moon::ipsec start
carol::ipsec start
carol::sleep 1
carol::ipsec up home
carol::sleep 1
+21
View File
@@ -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="moon carol winnetou"
# Corresponding block diagram
#
DIAGRAM="m-c-w.png"
# UML instances on which tcpdump is to be started
#
TCPDUMPHOSTS=""
# UML instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon carol"
@@ -0,0 +1,2 @@
By setting <b>strictcrlpolicy=yes</b> a <b>strict CRL policy</b> is enforced on
both roadwarrior <b>carol</b> and gateway <b>moon</b>.
@@ -0,0 +1,4 @@
moon::ipsec statusall::rw.*IKE_SA_ESTABLISHED::YES
carol::ipsec statusall::home.*IKE_SA_ESTABLISHED::YES
moon::ipsec listcrls:: ok::YES
carol::ipsec listcrls:: ok::YES
+22
View File
@@ -0,0 +1,22 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=yes
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
left=PH_IP_CAROL
leftnexthop=%direct
leftcert=carolCert.pem
[email protected]
conn home
right=PH_IP_MOON
rightsubnet=10.1.0.0/16
[email protected]
auto=add
+33
View File
@@ -0,0 +1,33 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=yes
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
left=PH_IP_MOON
leftnexthop=%direct
leftcert=moonCert.pem
[email protected]
conn net-net
leftsubnet=10.1.0.0/16
right=PH_IP_SUN
rightsubnet=10.2.0.0/16
[email protected]
auto=add
conn host-host
right=PH_IP_SUN
[email protected]
auto=add
conn rw
leftsubnet=10.1.0.0/16
right=%any
auto=add
@@ -0,0 +1,4 @@
moon::rm /etc/ipsec.d/crls/*
carol::rm /etc/ipsec.d/crls/*
moon::ipsec stop
carol::ipsec stop
@@ -0,0 +1,7 @@
moon::wget -q http://crl.strongswan.org/strongswan.crl -O /etc/ipsec.d/crls/strongswan.crl
carol::wget -q http://crl.strongswan.org/strongswan.crl -O /etc/ipsec.d/crls/strongswan.crl
moon::ipsec start
carol::ipsec start
carol::sleep 1
carol::ipsec up home
carol::sleep 1
+21
View File
@@ -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="moon carol winnetou"
# Corresponding block diagram
#
DIAGRAM="m-c-w.png"
# UML instances on which tcpdump is to be started
#
TCPDUMPHOSTS=""
# UML instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon carol"
@@ -0,0 +1,8 @@
Because of the missing <b>/etc/ipsec.secrets</b> file, roadwarrior <b>carol</b>
and gateway <b>moon</b> each automatically generate a PKCS#1 RSA private key
and a self-signed X.509 certificate. Because the UML testing environment does
not offer enough entropy, the non-blocking /dev/urandom device is used in place
of /dev/random for generating the random primes.
<p>
The self-signed certificates are then distributed to the peers via scp
and are used to set up a road warrior connection initiated by <b>carol</b>
@@ -0,0 +1,7 @@
carol::cat /var/log/auth.log::scepclient::YES
moon::cat /var/log/auth.log::scepclient::YES
carol::ipsec statusall::home.*IKE_SA_ESTABLISHED::YES
moon::ipsec statusall::carol.*IKE_SA_ESTABLISHED::YES
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::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,22 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn home
left=PH_IP_CAROL
leftnexthop=%direct
leftcert=selfCert.der
leftsendcert=never
right=PH_IP_MOON
rightsubnet=10.1.0.0/16
rightcert=peerCert.der
keyexchange=ikev2
auto=add
@@ -0,0 +1,78 @@
#!/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 esp
iptables -A INPUT -i eth0 -p 50 -j ACCEPT
iptables -A OUTPUT -o eth0 -p 50 -j ACCEPT
# allow IKE
iptables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT
iptables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -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 INPUT -p tcp --sport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 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
}
+23
View File
@@ -0,0 +1,23 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn carol
left=PH_IP_MOON
leftnexthop=%direct
leftcert=selfCert.der
leftsendcert=never
leftsubnet=10.1.0.0/16
right=%any
rightcert=peerCert.der
keyexchange=ikev2
auto=add
@@ -0,0 +1,6 @@
moon::ipsec stop
carol::ipsec stop
carol::rm /etc/ipsec.d/private/*
carol::rm /etc/ipsec.d/certs/*
moon::rm /etc/ipsec.d/private/*
moon::rm /etc/ipsec.d/certs/*
@@ -0,0 +1,18 @@
moon::echo 1 > /proc/sys/net/ipv4/ip_forward
carol::rm /etc/ipsec.secrets
carol::rm /etc/ipsec.d/private/*
carol::rm /etc/ipsec.d/certs/*
carol::rm /etc/ipsec.d/cacerts/*
carol::ipsec start
moon::rm /etc/ipsec.secrets
moon::rm /etc/ipsec.d/private/*
moon::rm /etc/ipsec.d/certs/*
moon::rm /etc/ipsec.d/cacerts/*
moon::ipsec start
moon::sleep 3
moon::scp /etc/ipsec.d/certs/selfCert.der carol:/etc/ipsec.d/certs/peerCert.der
moon::scp carol:/etc/ipsec.d/certs/selfCert.der /etc/ipsec.d/certs/peerCert.der
moon::ipsec reload
carol::ipsec reload
carol::ipsec up home
carol::sleep 1
@@ -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 carol"
# Corresponding block diagram
#
DIAGRAM="a-m-c.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="moon carol"
@@ -0,0 +1,3 @@
A connection between the hosts <b>moon</b> and <b>sun</b> is successfully set up.
The authentication is based on X.509 certificates.
In order to test the host-to-host tunnel <b>moon</b> pings <b>sun</b>.
@@ -0,0 +1,5 @@
moon::ipsec statusall::host-host.*IKE_SA_ESTABLISHED::YES
sun::ipsec statusall::host-host.*IKE_SA_ESTABLISHED::YES
moon::ping -c 1 PH_IP_SUN::64 bytes from PH_IP_SUN: icmp_seq=1::YES
sun::tcpdump::IP moon.strongswan.org > sun.strongswan.org: ESP::YES
sun::tcpdump::IP sun.strongswan.org > moon.strongswan.org: ESP::YES
@@ -0,0 +1,21 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn host-host
left=PH_IP_MOON
leftnexthop=%direct
leftcert=moonCert.pem
[email protected]
right=PH_IP_SUN
[email protected]
keyexchange=ikev2
auto=add
@@ -0,0 +1,21 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn host-host
left=PH_IP_SUN
leftnexthop=%direct
leftcert=sunCert.pem
[email protected]
right=PH_IP_MOON
[email protected]
keyexchange=ikev2
auto=add
@@ -0,0 +1,2 @@
moon::ipsec stop
sun::ipsec stop
@@ -0,0 +1,5 @@
moon::ipsec start
sun::ipsec start
moon::sleep 1
moon::ipsec up host-host
moon::sleep 1
@@ -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="moon winnetou sun"
# Corresponding block diagram
#
DIAGRAM="m-w-s.png"
# UML instances on which tcpdump is to be started
#
TCPDUMPHOSTS="sun"
# UML instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon sun"
@@ -0,0 +1,3 @@
Same scenario as test <a href="../host2host-cert/"><b>host2host-cert</b></a> but with
swapped end definitions: <b>right</b> denotes the <b>local</b> side whereas
<b>left</b> stands for the <b>remote</b> peer.
@@ -0,0 +1,5 @@
moon::ipsec statusall::host-host.*IKE_SA_ESTABLISHED::YES
sun::ipsec statusall::host-host.*IKE_SA_ESTABLISHED::YES
moon::ping -c 1 PH_IP_SUN::64 bytes from PH_IP_SUN: icmp_seq=1::YES
sun::tcpdump::IP moon.strongswan.org > sun.strongswan.org: ESP::YES
sun::tcpdump::IP sun.strongswan.org > moon.strongswan.org: ESP::YES
@@ -0,0 +1,21 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn host-host
right=PH_IP_MOON
rightnexthop=%direct
rightcert=moonCert.pem
[email protected]
left=PH_IP_SUN
[email protected]
keyexchange=ikev2
auto=add
@@ -0,0 +1,21 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn host-host
right=PH_IP_SUN
rightnexthop=%direct
rightcert=sunCert.pem
[email protected]
left=PH_IP_MOON
[email protected]
keyexchange=ikev2
auto=add
@@ -0,0 +1,2 @@
moon::ipsec stop
sun::ipsec stop
@@ -0,0 +1,5 @@
moon::ipsec start
sun::ipsec start
moon::sleep 1
moon::ipsec up host-host
moon::sleep 1
@@ -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="moon winnetou sun"
# Corresponding block diagram
#
DIAGRAM="m-w-s.png"
# UML instances on which tcpdump is to be started
#
TCPDUMPHOSTS="sun"
# UML instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon sun"
@@ -0,0 +1,4 @@
A connection between the subnets behind the gateways <b>moon</b> and <b>sun</b> is set up.
The authentication is based on <b>X.509 certificates</b>.
In order to test both tunnel and firewall, client <b>alice</b> behind gateway <b>moon</b>
pings client <b>bob</b> located behind gateway <b>sun</b>.
@@ -0,0 +1,5 @@
moon::ipsec statusall::net-net.*IKE_SA_ESTABLISHED::YES
sun::ipsec statusall::net-net.*IKE_SA_ESTABLISHED::YES
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
sun::tcpdump::IP moon.strongswan.org > sun.strongswan.org: ESP::YES
sun::tcpdump::IP sun.strongswan.org > moon.strongswan.org: ESP::YES
+22
View File
@@ -0,0 +1,22 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn net-net
left=PH_IP_MOON
leftcert=moonCert.pem
[email protected]
leftsubnet=10.1.0.0/16
right=PH_IP_SUN
[email protected]
rightsubnet=10.2.0.0/16
keyexchange=ikev2
auto=add
+22
View File
@@ -0,0 +1,22 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn net-net
left=PH_IP_SUN
leftcert=sunCert.pem
[email protected]
leftsubnet=10.2.0.0/16
right=PH_IP_MOON
[email protected]
rightsubnet=10.1.0.0/16
keyexchange=ikev2
auto=add
@@ -0,0 +1,5 @@
moon::ipsec stop
sun::ipsec stop
sun::rm /etc/ipsec.d/crls/*
moon::rm /etc/ipsec.d/crls/*
@@ -0,0 +1,9 @@
moon::echo 1 > /proc/sys/net/ipv4/ip_forward
sun::echo 1 > /proc/sys/net/ipv4/ip_forward
moon::wget -q http://crl.strongswan.org/strongswan.crl -O /etc/ipsec.d/crls/strongswan.crl
sun::wget -q http://crl.strongswan.org/strongswan.crl -O /etc/ipsec.d/crls/strongswan.crl
moon::ipsec start
sun::ipsec start
moon::sleep 1
moon::ipsec up net-net
moon::sleep 1
@@ -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="sun"
# UML instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon sun"
@@ -0,0 +1,4 @@
The roadwarriors <b>carol</b> and <b>dave</b> set up a connection to gateway <b>moon</b>.
The authentication is based on <b>X.509 certificates</b>.
In order to test both tunnel and firewall, <b>carol</b> and <b>dave</b> ping the client
<b>alice</b> behind the gateway <b>moon</b>.
+10
View File
@@ -0,0 +1,10 @@
moon::ipsec statusall::rw.*IKE_SA_ESTABLISHED::YES
carol::ipsec statusall::home.*IKE_SA_ESTABLISHED::YES
dave::ipsec statusall::home.*IKE_SA_ESTABLISHED::YES
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
dave::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
moon::tcpdump::IP carol.strongswan.org > moon.strongswan.org: ESP::YES
moon::tcpdump::IP moon.strongswan.org > carol.strongswan.org: ESP::YES
moon::tcpdump::IP dave.strongswan.org > moon.strongswan.org: ESP::YES
moon::tcpdump::IP moon.strongswan.org > dave.strongswan.org: ESP::YES
+22
View File
@@ -0,0 +1,22 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn home
left=PH_IP_CAROL
leftnexthop=%direct
leftcert=carolCert.pem
[email protected]
right=PH_IP_MOON
[email protected]
rightsubnet=10.1.0.0/16
keyexchange=ikev2
auto=add
+22
View File
@@ -0,0 +1,22 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn home
left=PH_IP_DAVE
leftnexthop=%direct
leftcert=daveCert.pem
[email protected]
right=PH_IP_MOON
[email protected]
rightsubnet=10.1.0.0/16
keyexchange=ikev2
auto=add
+21
View File
@@ -0,0 +1,21 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
strictcrlpolicy=no
plutostart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn rw
left=PH_IP_MOON
leftnexthop=%direct
leftcert=moonCert.pem
[email protected]
leftsubnet=10.1.0.0/16
right=%any
keyexchange=ikev2
auto=add
+6
View File
@@ -0,0 +1,6 @@
moon::ipsec stop
carol::ipsec stop
dave::ipsec stop
moon::rm /etc/ipsec.d/crls/*
carol::rm /etc/ipsec.d/crls/*
dave::rm /etc/ipsec.d/crls/*
+11
View File
@@ -0,0 +1,11 @@
moon::echo 1 > /proc/sys/net/ipv4/ip_forward
moon::wget -q http://crl.strongswan.org/strongswan.crl -O /etc/ipsec.d/crls/strongswan.crl
carol::wget -q http://crl.strongswan.org/strongswan.crl -O /etc/ipsec.d/crls/strongswan.crl
dave::wget -q http://crl.strongswan.org/strongswan.crl -O /etc/ipsec.d/crls/strongswan.crl
moon::ipsec start
carol::ipsec start
dave::ipsec start
carol::sleep 1
carol::ipsec up home
dave::ipsec up home
carol::sleep 1
+21
View File
@@ -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 carol winnetou dave"
# Corresponding block diagram
#
DIAGRAM="a-m-c-w-d.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="moon carol dave"