added virtual-ip scenario
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
The roadwarriors <b>carol</b> and <b>dave</b> both set up a connection to gateway <b>moon</b>.
|
||||||
|
The roadwarriors each unilaterally define a static virtual IP using the <b>leftsourceip</b>
|
||||||
|
parameter. In order to detect potential address conflicts, the roadwarriors send
|
||||||
|
their virtual IPs embedded in a configuration payload to <b>moon</b> for verification.
|
||||||
|
In our scenario <b>moon</b> accepts the address choices thus allowing <b>carol</b> and
|
||||||
|
<b>dave</b> to install their respective virtual IP addresses.
|
||||||
|
<p>
|
||||||
|
In order to test the tunnels both <b>carol</b> and <b>dave</b> ping the client <b>alice</b>
|
||||||
|
behind the gateway <b>moon</b> as well as the inner interface of the gateway.
|
||||||
|
The latter ping requires access to the gateway itself which is granted by the
|
||||||
|
directive <b>lefthostaccess=yes</b>. The source IP of the two pings will be the virtual
|
||||||
|
IP addresses <b>carol1</b> and <b>dave1</b>, respectively. Also thanks to the automatically
|
||||||
|
configured source route entries, <b>moon</b> is able to ping both roadwarriors by using the
|
||||||
|
established net-net IPsec tunnels.
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
moon::ipsec statusall::rw.*ESTABLISHED.*[email protected]::YES
|
||||||
|
moon::ipsec statusall::rw.*ESTABLISHED.*[email protected]::YES
|
||||||
|
carol::ipsec statusall::home.*INSTALLED::YES
|
||||||
|
dave::ipsec statusall::home.*INSTALLED::YES
|
||||||
|
moon::cat /var/log/daemon.log::peer requested virtual IP PH_IP_CAROL1::YES
|
||||||
|
moon::cat /var/log/daemon.log::peer requested virtual IP PH_IP_DAVE1::YES
|
||||||
|
moon::cat /var/log/daemon.log::not assigning a virtual IP to peer::YES
|
||||||
|
carol::ip addr list dev eth0::PH_IP_CAROL1::YES
|
||||||
|
carol::ip route list dev eth0::src PH_IP_CAROL1::YES
|
||||||
|
dave::ip addr list dev eth0::PH_IP_DAVE1::YES
|
||||||
|
dave::ip route list dev eth0::src PH_IP_DAVE1::YES
|
||||||
|
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
|
||||||
|
carol::ping -c 1 PH_IP_MOON1::64 bytes from PH_IP_MOON1: icmp_seq=1::YES
|
||||||
|
dave::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
|
||||||
|
dave::ping -c 1 PH_IP_MOON1::64 bytes from PH_IP_MOON1: icmp_seq=1::YES
|
||||||
|
moon::ping -c 1 PH_IP_CAROL1::64 bytes from PH_IP_CAROL1: icmp_seq=1::YES
|
||||||
|
moon::ping -c 1 PH_IP_DAVE1::64 bytes from PH_IP_CAROL1: 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
|
||||||
|
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
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
crlcheckinterval=180
|
||||||
|
strictcrlpolicy=no
|
||||||
|
plutostart=no
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
keyexchange=ikev2
|
||||||
|
|
||||||
|
conn home
|
||||||
|
left=PH_IP_CAROL
|
||||||
|
leftsourceip=PH_IP_CAROL1
|
||||||
|
leftcert=carolCert.pem
|
||||||
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP_MOON
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
[email protected]
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
crlcheckinterval=180
|
||||||
|
strictcrlpolicy=no
|
||||||
|
plutostart=no
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
keyexchange=ikev2
|
||||||
|
|
||||||
|
conn home
|
||||||
|
left=PH_IP_DAVE
|
||||||
|
leftsourceip=PH_IP_DAVE1
|
||||||
|
leftcert=daveCert.pem
|
||||||
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP_MOON
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
[email protected]
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
crlcheckinterval=180
|
||||||
|
strictcrlpolicy=no
|
||||||
|
plutostart=no
|
||||||
|
|
||||||
|
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
|
||||||
|
leftfirewall=yes
|
||||||
|
lefthostaccess=yes
|
||||||
|
right=%any
|
||||||
|
rightsubnet=10.3.0.0/16
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
moon::ipsec stop
|
||||||
|
carol::ipsec stop
|
||||||
|
moon::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
carol::/etc/init.d/iptables stop 2> /dev/null
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
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 1
|
||||||
|
carol::ipsec up home
|
||||||
|
dave::ipsec up home
|
||||||
@@ -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"
|
||||||
|
|
||||||
|
# UML instances on which IPsec is started
|
||||||
|
# Used for IPsec logging purposes
|
||||||
|
#
|
||||||
|
IPSECHOSTS="moon carol dave"
|
||||||
Reference in New Issue
Block a user