virtual-ip-override scenario added
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
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>carol</b> and <b>dave</b> both request the same IP address.
|
||||||
|
These requests are overridden by gateway <b>moon</b> which assigns a
|
||||||
|
distinct virtual IP to each road warrior.
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
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::NO
|
||||||
|
moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_CAROL1 to peer::YES
|
||||||
|
moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_DAVE1 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
|
||||||
|
|
||||||
@@ -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_CAROL1
|
||||||
|
leftcert=daveCert.pem
|
||||||
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP_MOON
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
[email protected]
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# /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
|
||||||
|
left=PH_IP_MOON
|
||||||
|
leftsubnet=10.1.0.0/16
|
||||||
|
leftsourceip=PH_IP_MOON1
|
||||||
|
leftcert=moonCert.pem
|
||||||
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
|
|
||||||
|
conn rw-carol
|
||||||
|
right=%any
|
||||||
|
[email protected]
|
||||||
|
rightsourceip=PH_IP_CAROL1
|
||||||
|
auto=add
|
||||||
|
|
||||||
|
conn rw-dave
|
||||||
|
right=%any
|
||||||
|
[email protected]
|
||||||
|
rightsourceip=PH_IP_DAVE1
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
moon::ipsec stop
|
||||||
|
carol::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
|
||||||
@@ -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=""
|
||||||
|
|
||||||
|
# UML instances on which IPsec is started
|
||||||
|
# Used for IPsec logging purposes
|
||||||
|
#
|
||||||
|
IPSECHOSTS="moon carol dave"
|
||||||
Reference in New Issue
Block a user