created ikev1/mode-config-multiple scenario

This commit is contained in:
Andreas Steffen 2009-10-01 09:42:35 +02:00
parent eb4544f773
commit 03a52ce4e5
9 changed files with 202 additions and 0 deletions

View File

@ -0,0 +1,6 @@
The roadwarriors <b>carol</b> and <b>dave</b> set up a connection each to gateway <b>moon</b>.
Both <b>carol</b> and <b>dave</b> request a <b>virtual IP</b> via the IKE Mode Config protocol
by using the <b>leftsourceip=%modeconfig</b> parameter. After setting up an IPsec SA to reach
the hosts <b>alice</b> and <b>venus</b>, respectively, both roadwarriors set up a second
IPsec SA to <b>venus</b> and <b>alice</b>, respectively, inheriting the virtual IP address
from the previous Mode Config negotiation.

View File

@ -0,0 +1,29 @@
carol::cat /var/log/auth.log::alice.*setting virtual IP source address to PH_IP_CAROL1::YES
carol::ipsec status::alice.*STATE_QUICK_I2.*IPsec SA established::YES
carol::cat /var/log/auth.log::venus.*inheriting virtual IP source address PH_IP_CAROL1 from ModeCfg::YES
carol::ipsec status::venus.*STATE_QUICK_I2.*IPsec SA established::YES
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
carol::ping -c 1 PH_IP_VENUS::64 bytes from PH_IP_VENUS: icmp_seq=1::YES
dave::cat /var/log/auth.log::venus.*setting virtual IP source address to PH_IP_DAVE1::YES
dave::ipsec status::venus.*STATE_QUICK_I2.*IPsec SA established::YES
dave::cat /var/log/auth.log::alice.*inheriting virtual IP source address PH_IP_DAVE1 from ModeCfg::YES
dave::ipsec status::alice.*STATE_QUICK_I2.*IPsec SA established::YES
dave::ping -c 1 PH_IP_VENUS::64 bytes from PH_IP_VENUS: icmp_seq=1::YES
dave::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
moon::ipsec status::carol-alice.*STATE_QUICK_R2.*IPsec SA established::YES
moon::ipsec status::carol-venus.*STATE_QUICK_R2.*IPsec SA established::YES
moon::ipsec status::dave-venus.*STATE_QUICK_R2.*IPsec SA established::YES
moon::ipsec status::dave-alice.*STATE_QUICK_R2.*IPsec SA established::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
alice::tcpdump::IP carol1.strongswan.org > alice.strongswan.org: ICMP echo request::YES
alice::tcpdump::IP alice.strongswan.org > carol1.strongswan.org: ICMP echo reply::YES
alice::tcpdump::IP dave1.strongswan.org > alice.strongswan.org: ICMP echo request::YES
alice::tcpdump::IP alice.strongswan.org > dave1.strongswan.org: ICMP echo reply::YES
venus::tcpdump::IP carol1.strongswan.org > venus.strongswan.org: ICMP echo request::YES
venus::tcpdump::IP venus.strongswan.org > carol1.strongswan.org: ICMP echo reply::YES
venus::tcpdump::IP dave1.strongswan.org > venus.strongswan.org: ICMP echo request::YES
venus::tcpdump::IP venus.strongswan.org > dave1.strongswan.org: ICMP echo reply::YES

View File

@ -0,0 +1,32 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
plutodebug=control
crlcheckinterval=180
strictcrlpolicy=no
charonstart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn alice
also=home
rightsubnet=10.1.0.10/32
auto=add
conn venus
also=home
rightsubnet=10.1.0.20/32
auto=add
conn home
left=192.168.0.100
leftsourceip=%modeconfig
leftcert=carolCert.pem
leftid=carol@strongswan.org
leftfirewall=yes
right=192.168.0.1
rightid=@moon.strongswan.org

View File

@ -0,0 +1,32 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
plutodebug=control
crlcheckinterval=180
strictcrlpolicy=no
charonstart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
conn alice
also=home
rightsubnet=10.1.0.10/32
auto=add
conn venus
also=home
rightsubnet=10.1.0.20/32
auto=add
conn home
left=PH_IP_DAVE
leftsourceip=%modeconfig
leftcert=daveCert.pem
leftid=dave@strongswan.org
leftfirewall=yes
right=PH_IP_MOON
rightid=@moon.strongswan.org

View File

@ -0,0 +1,49 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
plutodebug=control
crlcheckinterval=180
strictcrlpolicy=no
charonstart=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
left=192.168.0.1
leftsourceip=10.1.0.1
leftcert=moonCert.pem
leftid=@moon.strongswan.org
leftfirewall=yes
conn carol-alice
also=carol
leftsubnet=10.1.0.10/32
auto=add
conn carol-venus
also=carol
leftsubnet=10.1.0.20/32
auto=add
conn carol
right=%any
rightid=carol@strongswan.org
rightsourceip=10.3.0.1
conn dave-alice
also=dave
leftsubnet=10.1.0.10/32
auto=add
conn dave-venus
also=dave
leftsubnet=10.1.0.20/32
auto=add
conn dave
right=%any
rightid=dave@strongswan.org
rightsourceip=10.3.0.2

View File

@ -0,0 +1,13 @@
# /etc/strongswan.conf - strongSwan configuration file
pluto {
load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 gmp random curl
dns1 = PH_IP_WINNETOU
dns2 = PH_IP6_VENUS
}
# pluto uses optimized DH exponent sizes (RFC 3526)
libstrongswan {
dh_exponent_ansi_x9_42 = no
}

View File

@ -0,0 +1,8 @@
moon::ipsec stop
carol::ipsec stop
dave::ipsec stop
moon::/etc/init.d/iptables stop 2> /dev/null
carol::/etc/init.d/iptables stop 2> /dev/null
dave::/etc/init.d/iptables stop 2> /dev/null
carol::ip addr del PH_IP_CAROL1/32 dev eth0
dave::ip addr del PH_IP_DAVE1/32 dev eth0

View File

@ -0,0 +1,12 @@
moon::/etc/init.d/iptables start 2> /dev/null
carol::/etc/init.d/iptables start 2> /dev/null
dave::/etc/init.d/iptables start 2> /dev/null
carol::ipsec start
dave::ipsec start
moon::ipsec start
carol::sleep 2
carol::ipsec up alice
carol::ipsec up venus
dave::ipsec up venus
dave::ipsec up alice
carol::sleep 1

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 alice venus"
# UML instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon carol dave"