Added tnc/tnccs-20-fail-init and tnc/tnccs-20-fail-resp scenarios

This commit is contained in:
Andreas Steffen
2015-03-27 20:56:44 +01:00
parent ef5f96366e
commit 883c11caa0
38 changed files with 582 additions and 8 deletions
@@ -0,0 +1,10 @@
The roadwarriors <b>carol</b> and <b>dave</b> set up a connection each to gateway <b>moon</b>
using EAP-TTLS authentication only with the gateway presenting a server certificate and
the clients doing EAP-MD5 password-based authentication.
In a next step the EAP-TNC protocol is used within the EAP-TTLS tunnel to determine the
health of <b>carol</b> and <b>dave</b> via the <b>TNCCS 2.0 </b> client-server interface
compliant with <b>RFC 5793 PB-TNC</b>.
<p/>
Unfortunately <b>carol</b> sends her first PB-TNC batch with a wrong version number and
<b>dave</b> sends a PB-TNC message not supported by <b>moon</b> with the NOSKIP flag set.
Therefore both connection setups fail due to fatal PB-TNC errors.
@@ -0,0 +1,10 @@
moon:: cat /var/log/daemon.log::unsupported TNCCS batch version 0x03::YES
carol::cat /var/log/daemon.log::received fatal PB-TNC error.*Version Not Supported.*caused by bad version 0x03::YES
carol::cat /var/log/daemon.log::EAP_PT_EAP method failed::YES
moon:: cat /var/log/daemon.log::EAP method EAP_TTLS failed for peer [email protected]::YES
carol::cat /var/log/daemon.log::received EAP_FAILURE, EAP authentication failed::YES
moon:: cat /var/log/daemon.log::reject PB-TNC message (0x00902a/0x00000000)::YES
dave:: cat /var/log/daemon.log::received fatal PB-TNC error.*Unsupported Mandatory Message::YES
dave::cat /var/log/daemon.log::EAP_PT_EAP method failed::YES
moon:: cat /var/log/daemon.log::EAP method EAP_TTLS failed for peer [email protected]::YES
dave::cat /var/log/daemon.log::received EAP_FAILURE, EAP authentication failed::YES
@@ -0,0 +1,23 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
charondebug="tnc 3, imc 3"
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn home
left=PH_IP_CAROL
[email protected]
leftauth=eap
leftfirewall=yes
right=PH_IP_MOON
[email protected]
rightauth=any
rightsendcert=never
rightsubnet=10.1.0.0/16
auto=add
@@ -0,0 +1,3 @@
# /etc/ipsec.secrets - strongSwan IPsec secrets file
[email protected] : EAP "Ar3etTnp"
@@ -0,0 +1,23 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 curl revocation hmac stroke kernel-netlink socket-default eap-identity eap-md5 eap-ttls eap-tnc tnc-tnccs tnc-imc tnccs-20 updown
multiple_authentication = no
plugins {
tnccs-20 {
tests {
pb_tnc_version = 3
}
}
}
}
libimcv {
plugins {
imc-test {
command = allow
}
}
}
@@ -0,0 +1,3 @@
#IMC configuration file for strongSwan client
IMC "Test" /usr/local/lib/ipsec/imcvs/imc-test.so
@@ -0,0 +1,23 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
charondebug="tnc 3, imc 3"
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn home
left=PH_IP_DAVE
[email protected]
leftauth=eap
leftfirewall=yes
right=PH_IP_MOON
rightid=moon.strongswan.org
rightauth=any
rightsendcert=never
rightsubnet=10.1.0.0/16
auto=add
@@ -0,0 +1,3 @@
# /etc/ipsec.secrets - strongSwan IPsec secrets file
[email protected] : EAP "W7R0g3do"
@@ -0,0 +1,26 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 curl revocation hmac stroke kernel-netlink socket-default eap-identity eap-md5 eap-ttls eap-tnc tnc-imc tnc-tnccs tnccs-20 updown
multiple_authentication = no
plugins {
tnc-imc {
preferred_language = ru, pl , de
}
tnccs-20 {
tests {
pb_tnc_noskip = yes
}
}
}
}
libimcv {
plugins {
imc-test {
command = isolate
}
}
}
@@ -0,0 +1,3 @@
#IMC configuration file for strongSwan client
IMC "Test" /usr/local/lib/ipsec/imcvs/imc-test.so
@@ -0,0 +1,34 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
charondebug="tnc 3, imv 3"
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn rw-allow
rightgroups=allow
leftsubnet=10.1.0.0/28
also=rw-eap
auto=add
conn rw-isolate
rightgroups=isolate
leftsubnet=10.1.0.16/28
also=rw-eap
auto=add
conn rw-eap
left=PH_IP_MOON
leftcert=moonCert.pem
[email protected]
leftauth=eap-ttls
leftfirewall=yes
rightauth=eap-ttls
rightid=*@strongswan.org
rightsendcert=never
right=%any
@@ -0,0 +1,6 @@
# /etc/ipsec.secrets - strongSwan IPsec secrets file
: RSA moonKey.pem
[email protected] : EAP "Ar3etTnp"
[email protected] : EAP "W7R0g3do"
@@ -0,0 +1,23 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 curl revocation hmac stroke kernel-netlink socket-default eap-identity eap-ttls eap-md5 eap-tnc tnc-imv tnc-tnccs tnccs-20 updown
multiple_authentication = no
plugins {
eap-ttls {
phase2_method = md5
phase2_piggyback = yes
phase2_tnc = yes
}
}
}
libimcv {
plugins {
imv-test {
rounds = 1
}
}
}
@@ -0,0 +1,3 @@
#IMV configuration file for strongSwan client
IMV "Test" /usr/local/lib/ipsec/imcvs/imv-test.so
@@ -0,0 +1,6 @@
carol::ipsec stop
dave::ipsec stop
moon::ipsec stop
moon::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
dave::iptables-restore < /etc/iptables.flush
@@ -0,0 +1,12 @@
moon::iptables-restore < /etc/iptables.rules
carol::iptables-restore < /etc/iptables.rules
dave::iptables-restore < /etc/iptables.rules
moon::cat /etc/tnc_config
carol::cat /etc/tnc_config
dave::cat /etc/tnc_config
moon::ipsec start
carol::ipsec start
dave::ipsec start
carol::sleep 1
carol::ipsec up home
dave::ipsec up home
@@ -0,0 +1,26 @@
#!/bin/bash
#
# This configuration file provides information on the
# guest instances used for this test
# All guest instances that are required for this test
#
VIRTHOSTS="moon carol winnetou dave"
# Corresponding block diagram
#
DIAGRAM="a-m-c-w-d.png"
# Guest instances on which tcpdump is to be started
#
TCPDUMPHOSTS=""
# Guest instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon carol dave"
# Guest instances on which FreeRadius is started
#
RADIUSHOSTS=
@@ -0,0 +1,9 @@
The roadwarrior <b>carol</b> sets up a connection to gateway <b>moon</b>
using EAP-TTLS authentication only with the gateway presenting a server certificate and
the client doing EAP-MD5 password-based authentication.
In a next step the EAP-TNC protocol is used within the EAP-TTLS tunnel to determine the
health of <b>carol</b> via the <b>TNCCS 2.0 </b> client-server interface
compliant with <b>RFC 5793 PB-TNC</b>.
<p/>
Unfortunately <b>moon</b> sends his first PB-TNC batch with a wrong version number .
Therefore the connection setup fails due to a fatal PB-TNC error.
@@ -0,0 +1,5 @@
carol:: cat /var/log/daemon.log::unsupported TNCCS batch version 0x03::YES
moon::cat /var/log/daemon.log::received fatal PB-TNC error.*Version Not Supported.*caused by bad version 0x03::YES
moon::cat /var/log/daemon.log::EAP_PT_EAP method failed::YES
moon:: cat /var/log/daemon.log::EAP method EAP_TTLS failed for peer [email protected]::YES
carol::cat /var/log/daemon.log::received EAP_FAILURE, EAP authentication failed::YES
@@ -0,0 +1,23 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
charondebug="tnc 3, imc 3"
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn home
left=PH_IP_CAROL
[email protected]
leftauth=eap
leftfirewall=yes
right=PH_IP_MOON
[email protected]
rightauth=any
rightsendcert=never
rightsubnet=10.1.0.0/16
auto=add
@@ -0,0 +1,3 @@
# /etc/ipsec.secrets - strongSwan IPsec secrets file
[email protected] : EAP "Ar3etTnp"
@@ -0,0 +1,15 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 curl revocation hmac stroke kernel-netlink socket-default eap-identity eap-md5 eap-ttls eap-tnc tnc-tnccs tnc-imc tnccs-20 updown
multiple_authentication = no
}
libimcv {
plugins {
imc-test {
command = allow
}
}
}
@@ -0,0 +1,3 @@
#IMC configuration file for strongSwan client
IMC "Test" /usr/local/lib/ipsec/imcvs/imc-test.so
@@ -0,0 +1,34 @@
# /etc/ipsec.conf - strongSwan IPsec configuration file
config setup
charondebug="tnc 3, imv 3"
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn rw-allow
rightgroups=allow
leftsubnet=10.1.0.0/28
also=rw-eap
auto=add
conn rw-isolate
rightgroups=isolate
leftsubnet=10.1.0.16/28
also=rw-eap
auto=add
conn rw-eap
left=PH_IP_MOON
leftcert=moonCert.pem
[email protected]
leftauth=eap-ttls
leftfirewall=yes
rightauth=eap-ttls
rightid=*@strongswan.org
rightsendcert=never
right=%any
@@ -0,0 +1,6 @@
# /etc/ipsec.secrets - strongSwan IPsec secrets file
: RSA moonKey.pem
[email protected] : EAP "Ar3etTnp"
[email protected] : EAP "W7R0g3do"
@@ -0,0 +1,28 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 curl revocation hmac stroke kernel-netlink socket-default eap-identity eap-ttls eap-md5 eap-tnc tnc-imv tnc-tnccs tnccs-20 updown
multiple_authentication = no
plugins {
eap-ttls {
phase2_method = md5
phase2_piggyback = yes
phase2_tnc = yes
}
tnccs-20 {
tests {
pb_tnc_version = 3
}
}
}
}
libimcv {
plugins {
imv-test {
rounds = 1
}
}
}
@@ -0,0 +1,3 @@
#IMV configuration file for strongSwan client
IMV "Test" /usr/local/lib/ipsec/imcvs/imv-test.so
@@ -0,0 +1,4 @@
carol::ipsec stop
moon::ipsec stop
moon::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
@@ -0,0 +1,8 @@
moon::iptables-restore < /etc/iptables.rules
carol::iptables-restore < /etc/iptables.rules
moon::cat /etc/tnc_config
carol::cat /etc/tnc_config
moon::ipsec start
carol::ipsec start
carol::sleep 1
carol::ipsec up home
@@ -0,0 +1,26 @@
#!/bin/bash
#
# This configuration file provides information on the
# guest instances used for this test
# All guest instances that are required for this test
#
VIRTHOSTS="moon carol winnetou"
# Corresponding block diagram
#
DIAGRAM="a-m-c-w.png"
# Guest instances on which tcpdump is to be started
#
TCPDUMPHOSTS=""
# Guest instances on which IPsec is started
# Used for IPsec logging purposes
#
IPSECHOSTS="moon carol"
# Guest instances on which FreeRadius is started
#
RADIUSHOSTS=