added scenario ikev2/ip-split-pools-db
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
The roadwarriors <b>carol</b> and <b>dave</b> set up a connection each
|
||||||
|
to gateway <b>moon</b>. The authentication is based on <b>X.509 certificates</b>.
|
||||||
|
Both <b>carol</b> and <b>dave</b> request a <b>virtual IP</b> via the IKEv2 configuration
|
||||||
|
payload. The gateway moon assigns virtual IP addresses from two disjoint pools named
|
||||||
|
<b>pool0</b> comprising the single address <b>10.3.0.1</b> and <b>pool1</b> comprising the
|
||||||
|
single address <b>10.3.1.1</b> predefined in the SQL database.
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
carol::cat /var/log/daemon.log::installing new virtual IP 10.3.0.1::YES
|
||||||
|
carol::ipsec status::home.*INSTALLED::YES
|
||||||
|
dave::cat /var/log/daemon.log::installing new virtual IP 10.3.1.1::YES
|
||||||
|
dave::ipsec status::home.*INSTALLED::YES
|
||||||
|
moon::cat /var/log/daemon.log::acquired new lease for address 10.3.0.1 in pool.*pool0::YES
|
||||||
|
moon::cat /var/log/daemon.log::assigning virtual IP 10.3.0.1 to peer::YES
|
||||||
|
moon::cat /var/log/daemon.log::no available address found in pool.*pool0::YES
|
||||||
|
moon::cat /var/log/daemon.log::acquired new lease for address 10.3.1.1 in pool.*pool1::YES
|
||||||
|
moon::cat /var/log/daemon.log::assigning virtual IP 10.3.1.1 to peer::YES
|
||||||
|
moon::ipsec pool --status 2> /dev/null::pool0.*10.3.0.1.*10.3.0.1.*48h.*1 .*1 .*1 ::YES
|
||||||
|
moon::ipsec pool --status 2> /dev/null::pool1.*10.3.1.1.*10.3.1.1.*48h.*1 .*1 .*1 ::YES
|
||||||
|
moon::ipsec pool --leases --filter pool=pool0,addr=10.3.0.1,[email protected] 2> /dev/null::online::YES
|
||||||
|
moon::ipsec pool --leases --filter pool=pool1,addr=10.3.1.1,[email protected] 2> /dev/null::online::YES
|
||||||
|
moon::ipsec status::rw.*ESTABLISHED.*[email protected]::YES
|
||||||
|
moon::ipsec status::rw.*ESTABLISHED.*[email protected]::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=%config
|
||||||
|
leftcert=carolCert.pem
|
||||||
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP_MOON
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
[email protected]
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 gmp random x509 pubkey hmac xcbc stroke kernel-netlink updown
|
||||||
|
}
|
||||||
@@ -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=%config
|
||||||
|
leftcert=daveCert.pem
|
||||||
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP_MOON
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
[email protected]
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 gmp random x509 pubkey hmac xcbc stroke kernel-netlink updown
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# /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
|
||||||
|
leftsubnet=10.1.0.0/16
|
||||||
|
leftcert=moonCert.pem
|
||||||
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
|
right=%any
|
||||||
|
rightsourceip=%pool0,pool1
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
plugins {
|
||||||
|
sql {
|
||||||
|
database = sqlite:///etc/ipsec.d/ipsec.db
|
||||||
|
}
|
||||||
|
}
|
||||||
|
load = curl aes des sha1 sha2 md5 gmp random x509 pubkey hmac xcbc stroke kernel-netlink sqlite sql updown
|
||||||
|
}
|
||||||
|
|
||||||
|
pool {
|
||||||
|
load = sqlite
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
moon::ipsec stop
|
||||||
|
carol::ipsec stop
|
||||||
|
dave::ipsec stop
|
||||||
|
moon::ipsec pool --del pool0 2> /dev/null
|
||||||
|
moon::ipsec pool --del pool1 2> /dev/null
|
||||||
|
moon::rm /etc/ipsec.d/ipsec.*
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
moon::cat /etc/ipsec.d/tables.sql > /etc/ipsec.d/ipsec.sql
|
||||||
|
moon::cat /etc/ipsec.d/ipsec.sql | sqlite3 /etc/ipsec.d/ipsec.db
|
||||||
|
moon::ipsec pool --add pool0 --start 10.3.0.1 --end 10.3.0.1 --timeout 48 2> /dev/null
|
||||||
|
moon::ipsec pool --add pool1 --start 10.3.1.1 --end 10.3.1.1 --timeout 48 2> /dev/null
|
||||||
|
moon::ipsec pool --status 2> /dev/null
|
||||||
|
carol::ipsec start
|
||||||
|
dave::ipsec start
|
||||||
|
moon::ipsec start
|
||||||
|
carol::sleep 2
|
||||||
|
carol::ipsec up home
|
||||||
|
dave::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 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