added ikev2/rw-whitelist scenario
This commit is contained in:
@@ -317,6 +317,11 @@ then
|
|||||||
echo -n " --enable-af-alg" >> $INSTALLSHELL
|
echo -n " --enable-af-alg" >> $INSTALLSHELL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$USE_WHITELIST" = "yes" ]
|
||||||
|
then
|
||||||
|
echo -n " --enable-whitelist" >> $INSTALLSHELL
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$USE_CISCO_QUIRKS" = "yes" ]
|
if [ "$USE_CISCO_QUIRKS" = "yes" ]
|
||||||
then
|
then
|
||||||
echo -n " --enable-cisco-quirks" >> $INSTALLSHELL
|
echo -n " --enable-cisco-quirks" >> $INSTALLSHELL
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ USE_CCM="yes"
|
|||||||
USE_GCM="yes"
|
USE_GCM="yes"
|
||||||
USE_HA="yes"
|
USE_HA="yes"
|
||||||
USE_AF_ALG="yes"
|
USE_AF_ALG="yes"
|
||||||
|
USE_WHITELIST="yes"
|
||||||
USE_CISCO_QUIRKS="no"
|
USE_CISCO_QUIRKS="no"
|
||||||
|
|
||||||
# Gentoo linux root filesystem
|
# Gentoo linux root filesystem
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
The roadwarriors <b>carol</b> and <b>dave</b> set up a connection each to gateway <b>moon</b>.
|
||||||
|
<b>moon</b> uses whitelisting to grant access to <b>carol</b> with ID <b>[email protected]</b>
|
||||||
|
whereas since ID <b>[email protected]</b> is not listed, <b>dave</b> gets rejected.
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
moon::cat /var/log/daemon.log::whitelist functionality enabled::YES
|
||||||
|
moon::cat /var/log/daemon.log::authentication of '[email protected]' with RSA signature successful::YES
|
||||||
|
moon::cat /var/log/daemon.log::authentication of '[email protected]' with RSA signature successful::YES
|
||||||
|
moon::cat /var/log/daemon.log::peer identity '[email protected]' not whitelisted::YES
|
||||||
|
carol::ipsec status::home.*INSTALLED::YES
|
||||||
|
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
|
||||||
|
dave::cat /var/log/daemon.log:: received AUTHENTICATION_FAILED notify error::YES
|
||||||
|
dave::ipsec status::home.*INSTALLED::NO
|
||||||
|
dave::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::NO
|
||||||
|
moon::ipsec status::rw.*ESTABLISHED.*[email protected]::YES
|
||||||
|
moon::ipsec status::rw.*ESTABLISHED.*[email protected]::NO
|
||||||
|
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::NO
|
||||||
|
moon::tcpdump::IP moon.strongswan.org > dave.strongswan.org: ESP::NO
|
||||||
|
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::NO
|
||||||
|
alice::tcpdump::IP alice.strongswan.org > dave1.strongswan.org: ICMP echo reply::NO
|
||||||
@@ -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 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default 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 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default 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=10.3.0.0/28
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc whitelist stroke kernel-netlink socket-default updown
|
||||||
|
plugins {
|
||||||
|
whitelist {
|
||||||
|
enable = yes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
carol::ipsec stop
|
||||||
|
dave::ipsec stop
|
||||||
|
moon::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,15 @@
|
|||||||
|
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
|
||||||
|
moon::ipsec whitelist add [email protected]
|
||||||
|
moon::ipsec whitelist add [email protected]
|
||||||
|
moon::ipsec whitelist add [email protected]
|
||||||
|
moon::ipsec whitelist enable
|
||||||
|
moon::ipsec whitelist list
|
||||||
|
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