Added tnc/tnccs-11-supplicant scenario

This commit is contained in:
Andreas Steffen
2013-10-11 20:18:59 +02:00
parent cae778147a
commit 3bd4536185
29 changed files with 1489 additions and 0 deletions
@@ -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
}
@@ -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
}
@@ -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
@@ -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
}
}
}