Free Radius Tutorial
Free Radius Tutorial
Version 1.2
Charles Schwartz
Network Security Engineer
FreeRADIUS Active Directory Integration Charles Schwartz
Index
Introduction .................................................................................. 3
I Principles ................................................................................ 4
II Prerequisites ........................................................................... 5
Page 2 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Introduction
This document describes how to set up FREERADIUS server in order to
authenticate Windows XP network users transparently against Active
Directory.
It is a step by step 'quick&dirty' guide to configure FREERADIUS
server, network access points and WindowsXP supplicants.
Page 3 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
I Principles
FREERADIUS offers authentication via port based access control. A user can
connect to the network only if its credentials have been validated by the
authentication server. User credentials are verified by using special authentication
protocols which belong to the 802.1X standard.
Page 4 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
II Prerequisites
• A Linux server
• FREERADIUS 1.0.x
• Samba 3.0.x
• Openssl
Page 5 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Please have a look at your Linux box and check if Samba is already
installed.
Find the file smb.conf and open it with your preferred editor.
Page 6 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Edit this file with the following information: (Watch out for case
sensitivity)
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = EXAMPLE.COM
dns_lookup_realm = false
dns_lookup_kdc = false
[realms]
EXAMPLE.COM = {
kdc = kerberos.example.com:88
admin_server = kerberos.example.com:749
default_domain = example.com
}
XYZ-COMPANY.COM = {
kdc = XYZSRV.XYZ-COMPANY.COM
}
[domain_realm]
.example.com = EXAMPLE.COM
example.com = EXAMPLE.COM
[kdc]
profile = /var/kerberos/krb5kdc/kdc.conf
[appdefaults]
pam = {
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
}
Page 7 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
~#wbinfo –a user%password
Page 8 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Page 9 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
IV Installation of FREERADIUS
Download first the latest source of Openssl (0.9.7f was used for my
tests).
~# ./configure –sysconfdir=/etc/
~# make
~# make install
• clients.conf
• radiusd.conf
• eap.conf
• users
Page 10 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Now we add a first Cisco switch which will be charged for access
control.
Add:
client 192.168.2.44 {
secret = 2!34r&dp0t
shortname = 192.168.2.44
nastype = cisco
}
client 192.168.2.0/24 {
secret = 2!34r&dp0t
shortname = network1
}
Page 11 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Make sure that the following lines are uncommented and that the
value is the same as indicated here.
authtype = MS-CHAP
with_ntdomain_hack = yes
The following line is the most important one. It allows using the
Windows Domain Controller (Active Directory) for authentication.
Proceed to section
## EAP-TLS
Page 12 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
tls {
private_key_password = whatever
private_key_file = ${raddbdir}/certs/cert-srv.pem
certificate_file = ${raddbdir}/certs/cert-srv.pem
dh_file = ${raddbdir}/certs/dh
random_file = ${raddbdir}/certs/random
random_file = /dev/urandom
}
peap {
default_eap_type = mschapv2
Page 13 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Here are the commands to activate the switch for 802.1x port
based authentication:
Page 14 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Repeat this procedure for each port that should do access control:
#configure terminal
(config)#interface FastEthernet1/0/12
(config-if)# switchport mode access
(config-if)# dot1x port-control auto
(config-if)# end
Page 15 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Open the network configuration panel select the network card and enter
the properties.
Page 16 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Page 17 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
Page 18 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
TLS and PEAP require both server and client certificates. To generate the
requested certificates, it is recommended to use the script « CA.all » that
comes with FREERADIUS.
CA.all uses the configuration of the openssl.cnf file. It is possible to
replace the certificates later by those obtained from a real certification
authority.
Please replace the green items with the ones that correspond to your
country and company
# req_extensions = v3_req
[ req_distinguished_name ]
Page 19 of 20 8.06.2005
FreeRADIUS Active Directory Integration Charles Schwartz
[ req_attributes ]
During the first pass, this information produces the root certificates.
We can accept all default values while this pass.
The second pass produces the client certificates. We have to change the
CommonName for the name of the client.
During the third pass, we have to change only the CommonName to the
name of the server.
Before executing the script, check the following line in the CA.all script:
echo "newreq.pem" | /usr/local/openssl/ssl/misc/CA.pl –newca
The server needs the files root.pem and cert.srv.pem in order to work
with PEAP.
Good luck!
Page 20 of 20 8.06.2005