mirror of
https://github.com/strongswan/strongswan.git
synced 2025-11-13 00:00:38 -05:00
added ikev2/rw-eap-ttls-only scenario
This commit is contained in:
parent
79f2102cb4
commit
d2be215a99
4
testing/tests/ikev2/rw-eap-ttls-only/description.txt
Normal file
4
testing/tests/ikev2/rw-eap-ttls-only/description.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
The roadwarrior <b>carol</b> sets up a connection to gateway <b>moon</b>.
|
||||||
|
The strong mutual authentication of both peers is based on <b>EAP-TLS</b> only
|
||||||
|
(without a separate IKEv2 authentication), using TLS client and server certificates,
|
||||||
|
respectively.
|
||||||
19
testing/tests/ikev2/rw-eap-ttls-only/evaltest.dat
Normal file
19
testing/tests/ikev2/rw-eap-ttls-only/evaltest.dat
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
carol::cat /var/log/daemon.log::server requested EAP_TTLS authentication::YES
|
||||||
|
carol::cat /var/log/daemon.log::allow mutual EAP-only authentication::YES
|
||||||
|
carol::cat /var/log/daemon.log::server requested EAP_MD5 authentication::YES
|
||||||
|
carol::cat /var/log/daemon.log::EAP method EAP_TTLS succeeded, MSK established::YES
|
||||||
|
carol::cat /var/log/daemon.log::authentication of 'C=CH, O=Linux strongSwan, CN=moon.strongswan.org' with EAP successful::YES
|
||||||
|
dave::cat /var/log/daemon.log::server requested EAP_TTLS authentication::YES
|
||||||
|
dave::cat /var/log/daemon.log::allow mutual EAP-only authentication::YES
|
||||||
|
dave::cat /var/log/daemon.log::server requested EAP_MD5 authentication::YES
|
||||||
|
dave::cat /var/log/daemon.log::received EAP_FAILURE, EAP authentication failed::YES
|
||||||
|
moon::cat /var/log/daemon.log::EAP_TTLS phase2 authentication of 'carol@strongswan.org' with EAP_MD5 successful::YES
|
||||||
|
moon::cat /var/log/daemon.log::authentication of 'carol@strongswan.org' with EAP successful::YES
|
||||||
|
moon::cat /var/log/daemon.log::EAP method EAP_TTLS failed for peer dave@strongswan.org::YES
|
||||||
|
moon::ipsec statusall::rw-eap.*ESTABLISHED.*carol@strongswan.org::YES
|
||||||
|
moon::ipsec statusall::rw-eap.*ESTABLISHED.*dave@stronswan.org::NO
|
||||||
|
carol::ipsec statusall::home.*ESTABLISHED::YES
|
||||||
|
dave::ipsec statusall::home.*ESTABLISHED::NO
|
||||||
|
carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: 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
|
||||||
23
testing/tests/ikev2/rw-eap-ttls-only/hosts/carol/etc/ipsec.conf
Executable file
23
testing/tests/ikev2/rw-eap-ttls-only/hosts/carol/etc/ipsec.conf
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
plutostart=no
|
||||||
|
charondebug="ike 2"
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
keyexchange=ikev2
|
||||||
|
|
||||||
|
conn home
|
||||||
|
left=PH_IP_CAROL
|
||||||
|
leftid=carol@strongswan.org
|
||||||
|
leftauth=eap
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP_MOON
|
||||||
|
rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
rightsendcert=never
|
||||||
|
auto=add
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
||||||
|
|
||||||
|
carol@strongswan.org : EAP "Ar3etTnp"
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
# /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 eap-identity eap-md5 eap-ttls updown
|
||||||
|
multiple_authentication=no
|
||||||
|
}
|
||||||
23
testing/tests/ikev2/rw-eap-ttls-only/hosts/dave/etc/ipsec.conf
Executable file
23
testing/tests/ikev2/rw-eap-ttls-only/hosts/dave/etc/ipsec.conf
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
plutostart=no
|
||||||
|
charondebug="ike 2"
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
keyexchange=ikev2
|
||||||
|
|
||||||
|
conn home
|
||||||
|
left=PH_IP_DAVE
|
||||||
|
leftid=dave@strongswan.org
|
||||||
|
leftauth=eap
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP_MOON
|
||||||
|
rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
rightsendcert=never
|
||||||
|
auto=add
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
||||||
|
|
||||||
|
dave@strongswan.org : EAP "UgaM65Va"
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
# /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 eap-identity eap-md5 eap-ttls updown
|
||||||
|
multiple_authentication=no
|
||||||
|
}
|
||||||
24
testing/tests/ikev2/rw-eap-ttls-only/hosts/moon/etc/ipsec.conf
Executable file
24
testing/tests/ikev2/rw-eap-ttls-only/hosts/moon/etc/ipsec.conf
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
strictcrlpolicy=no
|
||||||
|
plutostart=no
|
||||||
|
charondebug="ike 2"
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
keyexchange=ikev2
|
||||||
|
|
||||||
|
conn rw-eap
|
||||||
|
left=PH_IP_MOON
|
||||||
|
leftsubnet=10.1.0.0/16
|
||||||
|
leftcert=moonCert.pem
|
||||||
|
leftauth=eap-ttls
|
||||||
|
leftfirewall=yes
|
||||||
|
rightauth=eap-ttls
|
||||||
|
rightsendcert=never
|
||||||
|
right=%any
|
||||||
|
auto=add
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
||||||
|
|
||||||
|
: RSA moonKey.pem
|
||||||
|
|
||||||
|
carol@strongswan.org : EAP "Ar3etTnp"
|
||||||
|
dave@strongswan.org : EAP "W7R0g3do"
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
# /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 eap-identity eap-md5 eap-ttls updown
|
||||||
|
multiple_authentication=no
|
||||||
|
plugins {
|
||||||
|
eap-ttls {
|
||||||
|
phase2_method = md5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6
testing/tests/ikev2/rw-eap-ttls-only/posttest.dat
Normal file
6
testing/tests/ikev2/rw-eap-ttls-only/posttest.dat
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
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
|
||||||
10
testing/tests/ikev2/rw-eap-ttls-only/pretest.dat
Normal file
10
testing/tests/ikev2/rw-eap-ttls-only/pretest.dat
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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
|
||||||
|
moon::ipsec start
|
||||||
|
carol::ipsec start
|
||||||
|
dave::ipsec start
|
||||||
|
carol::sleep 1
|
||||||
|
carol::ipsec up home
|
||||||
|
dave::ipsec up home
|
||||||
|
dave::sleep 1
|
||||||
21
testing/tests/ikev2/rw-eap-ttls-only/test.conf
Normal file
21
testing/tests/ikev2/rw-eap-ttls-only/test.conf
Normal 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"
|
||||||
|
|
||||||
|
# UML instances on which IPsec is started
|
||||||
|
# Used for IPsec logging purposes
|
||||||
|
#
|
||||||
|
IPSECHOSTS="moon carol dave"
|
||||||
Loading…
x
Reference in New Issue
Block a user