Added tnc/tnccs-11-supplicant scenario
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
The layer 2 supplicants <b>carol</b> and <b>dave</b> want to connect to a network
|
||||||
|
via switch <b>moon</b> which delegates the IEEE 802.1X authentication to the RADIUS
|
||||||
|
server <b>alice</b>. <b>carol</b> and <b>dave</b> set up an <b>EAP-TTLS</b> tunnel
|
||||||
|
each via <b>moon</b> to the <a href="http://trust.inform.fh-hannover.de/joomla/index.php/projects/tncfhh" target="popup"> <b>TNC@FHH</b></a>-enhanced FreeRADIUS server <b>alice</b> authenticated
|
||||||
|
by an X.509 AAA certificate.
|
||||||
|
The strong EAP-TTLS tunnel protects the ensuing weak client authentication based on <b>EAP-MD5</b>.
|
||||||
|
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>IF-TNCCS 1.1</b> client-server interface.
|
||||||
|
The communication between IMCs and IMVs is based on the <b>IF-M</b> protocol defined by <b>RFC 5792 PA-TNC</b>.
|
||||||
|
<p>
|
||||||
|
<b>carol</b> passes the health test and <b>dave</b> fails. Based on these measurements the clients
|
||||||
|
are connected by switch <b>moon</b> to the "allow" and "isolate" VLANs, respectively.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
carol::cat /var/log/daemon.log::IMC.*changed state.*Allowed::YES
|
||||||
|
dave:: cat /var/log/daemon.log::IMC.*changed state.*Isolate::YES
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
eap {
|
||||||
|
md5 {
|
||||||
|
}
|
||||||
|
default_eap_type = ttls
|
||||||
|
tls {
|
||||||
|
private_key_file = /etc/raddb/certs/aaaKey.pem
|
||||||
|
certificate_file = /etc/raddb/certs/aaaCert.pem
|
||||||
|
CA_file = /etc/raddb/certs/strongswanCert.pem
|
||||||
|
cipher_list = "DEFAULT"
|
||||||
|
dh_file = /etc/raddb/certs/dh
|
||||||
|
random_file = /etc/raddb/certs/random
|
||||||
|
}
|
||||||
|
ttls {
|
||||||
|
default_eap_type = md5
|
||||||
|
use_tunneled_reply = yes
|
||||||
|
virtual_server = "inner-tunnel"
|
||||||
|
tnc_virtual_server = "inner-tunnel-second"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
eap eap_tnc {
|
||||||
|
default_eap_type = tnc
|
||||||
|
tnc {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
realm strongswan.org {
|
||||||
|
type = radius
|
||||||
|
authhost = LOCAL
|
||||||
|
accthost = LOCAL
|
||||||
|
}
|
||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
authorize {
|
||||||
|
suffix
|
||||||
|
eap {
|
||||||
|
ok = return
|
||||||
|
}
|
||||||
|
files
|
||||||
|
}
|
||||||
|
|
||||||
|
authenticate {
|
||||||
|
eap
|
||||||
|
}
|
||||||
|
|
||||||
|
preacct {
|
||||||
|
preprocess
|
||||||
|
acct_unique
|
||||||
|
suffix
|
||||||
|
files
|
||||||
|
}
|
||||||
|
|
||||||
|
accounting {
|
||||||
|
detail
|
||||||
|
unix
|
||||||
|
radutmp
|
||||||
|
attr_filter.accounting_response
|
||||||
|
}
|
||||||
|
|
||||||
|
session {
|
||||||
|
radutmp
|
||||||
|
}
|
||||||
|
|
||||||
|
post-auth {
|
||||||
|
exec
|
||||||
|
Post-Auth-Type REJECT {
|
||||||
|
attr_filter.access_reject
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pre-proxy {
|
||||||
|
}
|
||||||
|
|
||||||
|
post-proxy {
|
||||||
|
eap
|
||||||
|
}
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
server inner-tunnel {
|
||||||
|
|
||||||
|
authorize {
|
||||||
|
suffix
|
||||||
|
eap {
|
||||||
|
ok = return
|
||||||
|
}
|
||||||
|
files
|
||||||
|
}
|
||||||
|
|
||||||
|
authenticate {
|
||||||
|
eap
|
||||||
|
}
|
||||||
|
|
||||||
|
session {
|
||||||
|
radutmp
|
||||||
|
}
|
||||||
|
|
||||||
|
post-auth {
|
||||||
|
Post-Auth-Type REJECT {
|
||||||
|
attr_filter.access_reject
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pre-proxy {
|
||||||
|
}
|
||||||
|
|
||||||
|
post-proxy {
|
||||||
|
eap
|
||||||
|
}
|
||||||
|
|
||||||
|
} # inner-tunnel server block
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
server inner-tunnel-second {
|
||||||
|
|
||||||
|
authorize {
|
||||||
|
eap_tnc {
|
||||||
|
ok = return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
authenticate {
|
||||||
|
eap_tnc
|
||||||
|
}
|
||||||
|
|
||||||
|
session {
|
||||||
|
radutmp
|
||||||
|
}
|
||||||
|
|
||||||
|
post-auth {
|
||||||
|
if (control:TNC-Status == "Access") {
|
||||||
|
update reply {
|
||||||
|
Tunnel-Type := ESP
|
||||||
|
Filter-Id := "allow"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif (control:TNC-Status == "Isolate") {
|
||||||
|
update reply {
|
||||||
|
Tunnel-Type := ESP
|
||||||
|
Filter-Id := "isolate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Post-Auth-Type REJECT {
|
||||||
|
attr_filter.access_reject
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} # inner-tunnel-second block
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
carol Cleartext-Password := "Ar3etTnp"
|
||||||
|
dave Cleartext-Password := "W7R0g3do"
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
libimcv {
|
||||||
|
debug_level = 3
|
||||||
|
assessment_result = no
|
||||||
|
plugins {
|
||||||
|
imv-test {
|
||||||
|
rounds = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Set root logger level to DEBUG and its appenders to A1 and A2.
|
||||||
|
log4j.rootLogger=DEBUG, A1, A2
|
||||||
|
|
||||||
|
# A1 is set to be a ConsoleAppender.
|
||||||
|
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||||
|
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.A1.layout.ConversionPattern=[FHH] %m%n
|
||||||
|
|
||||||
|
# A2 is set to be a SyslogAppender
|
||||||
|
log4j.appender.A2=org.apache.log4j.net.SyslogAppender
|
||||||
|
log4j.appender.A2.Facility=DAEMON
|
||||||
|
log4j.appender.A2.SyslogHost=localhost
|
||||||
|
log4j.appender.A2.Threshold=DEBUG
|
||||||
|
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.A2.layout.ConversionPattern=[FHH] %m%n
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#IMV configuration file for strongSwan client
|
||||||
|
|
||||||
|
IMV "Test" /usr/local/lib/ipsec/imcvs/imv-test.so
|
||||||
|
IMV "Scanner" /usr/local/lib/ipsec/imcvs/imv-scanner.so
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
libimcv {
|
||||||
|
debug_level = 3
|
||||||
|
plugins {
|
||||||
|
imc-test {
|
||||||
|
command = allow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#IMC configuration file for strongSwan client
|
||||||
|
|
||||||
|
IMC "Test" /usr/local/lib/ipsec/imcvs/imc-test.so
|
||||||
|
IMC "Scanner" /usr/local/lib/ipsec/imcvs/imc-scanner.so
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
network={
|
||||||
|
ssid="eap_ttls"
|
||||||
|
scan_ssid=0
|
||||||
|
key_mgmt=IEEE8021X
|
||||||
|
eap=TTLS
|
||||||
|
identity="carol"
|
||||||
|
password="Ar3etTnp"
|
||||||
|
ca_cert="/etc/ipsec.d/cacerts/strongswanCert.pem"
|
||||||
|
id_str=""
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
libimcv {
|
||||||
|
debug_level = 3
|
||||||
|
plugins {
|
||||||
|
imc-test {
|
||||||
|
command = isolate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#IMC configuration file for strongSwan client
|
||||||
|
|
||||||
|
IMC "Test" /usr/local/lib/ipsec/imcvs/imc-test.so
|
||||||
|
IMC "Scanner" /usr/local/lib/ipsec/imcvs/imc-scanner.so
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
network={
|
||||||
|
ssid="eap_ttls"
|
||||||
|
scan_ssid=0
|
||||||
|
key_mgmt=IEEE8021X
|
||||||
|
eap=TTLS
|
||||||
|
identity="dave"
|
||||||
|
password="W7R0g3do"
|
||||||
|
ca_cert="/etc/ipsec.d/cacerts/strongswanCert.pem"
|
||||||
|
id_str=""
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
|
||||||
|
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=pubkey
|
||||||
|
leftfirewall=yes
|
||||||
|
rightauth=eap-radius
|
||||||
|
rightid=*@strongswan.org
|
||||||
|
rightsendcert=never
|
||||||
|
right=%any
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
||||||
|
|
||||||
|
: RSA moonKey.pem
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
*filter
|
||||||
|
|
||||||
|
# default policy is DROP
|
||||||
|
-P INPUT DROP
|
||||||
|
-P OUTPUT DROP
|
||||||
|
-P FORWARD DROP
|
||||||
|
|
||||||
|
# allow esp
|
||||||
|
-A INPUT -i eth0 -p 50 -j ACCEPT
|
||||||
|
-A OUTPUT -o eth0 -p 50 -j ACCEPT
|
||||||
|
|
||||||
|
# allow IKE
|
||||||
|
-A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT
|
||||||
|
-A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT
|
||||||
|
|
||||||
|
# allow MobIKE
|
||||||
|
-A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
||||||
|
-A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
||||||
|
|
||||||
|
# allow ssh
|
||||||
|
-A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
|
-A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl fetch from winnetou
|
||||||
|
-A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
||||||
|
-A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
|
# allow RADIUS protocol with alice
|
||||||
|
-A INPUT -i eth1 -p udp --sport 1812 -s PH_IP_ALICE -j ACCEPT
|
||||||
|
-A OUTPUT -o eth1 -p udp --dport 1812 -d PH_IP_ALICE -j ACCEPT
|
||||||
|
|
||||||
|
COMMIT
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default eap-radius updown
|
||||||
|
multiple_authentication=no
|
||||||
|
plugins {
|
||||||
|
eap-radius {
|
||||||
|
secret = gv6URkSs
|
||||||
|
server = PH_IP_ALICE
|
||||||
|
filter_id = yes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
carol::killall wpa_supplicant
|
||||||
|
dave::killall wpa_supplicant
|
||||||
|
moon::killall hostapd
|
||||||
|
alice::killall radiusd
|
||||||
|
alice::rm /etc/freeradius/sites-enabled/inner-tunnel-second
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
alice::ln -s /etc/freeradius/sites-available/inner-tunnel-second /etc/freeradius/sites-enabled/inner-tunnel-second
|
||||||
|
alice::cat /etc/freeradius/sites-enabled/inner-tunnel-second
|
||||||
|
alice::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties radiusd
|
||||||
|
alice::cat /etc/tnc_config
|
||||||
|
carol::cat /etc/tnc_config
|
||||||
|
dave::cat /etc/tnc_config
|
||||||
|
moon::hostapd -B /etc/hostapd/hostapd.conf
|
||||||
|
carol::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties wpa_supplicant -B -c /etc/wpa_supplicant.conf -D wired -i eth0
|
||||||
|
carol::sleep 4
|
||||||
|
dave::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties wpa_supplicant -B -c /etc/wpa_supplicant.conf -D wired -i eth0
|
||||||
|
dave::sleep 4
|
||||||
@@ -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="alice venus moon carol winnetou dave"
|
||||||
|
|
||||||
|
# Corresponding block diagram
|
||||||
|
#
|
||||||
|
DIAGRAM="a-v-m-c-w-d.png"
|
||||||
|
|
||||||
|
# Guest instances on which tcpdump is to be started
|
||||||
|
#
|
||||||
|
TCPDUMPHOSTS="moon"
|
||||||
|
|
||||||
|
# Guest instances on which IPsec is started
|
||||||
|
# Used for IPsec logging purposes
|
||||||
|
#
|
||||||
|
IPSECHOSTS="moon carol dave"
|
||||||
|
|
||||||
|
# Guest instances on which FreeRadius is started
|
||||||
|
#
|
||||||
|
RADIUSHOSTS="alice"
|
||||||
|
|
||||||
Reference in New Issue
Block a user