PEAP worked out fine for me with username/password logins (no
certificates). It's Microsoft's protocol and since I have a lot of
Windows clients, it was the obvious choice. Ofcourse it depends on what
kind clients you have.
PEAP didn't work out very well with MacOSX clients though. I'm still testing if MacOSX might work better with TTLS.
good luck!
Jelle
Am 16.06.2008 um 16:14 schrieb Jelle Langbroek:Well, it looks like your client doesn't have a client-certificate installed. When using TLS your client needs a certificate installed. Radius gives you the following error:
"rlm_eap: SSL error error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned"
That's the problem. Do I have to use TTLS when I don't want client certificates, only server certificates, right? I think I mixed it up ;)thanksJulian2008/6/16 Julian Stöver <julian_st@gmx.de>:
Hi
I'm running Freeradius2 with EAP-TLS. I've created new certificates and putted them into my certs-dir. Radius starts with no errors. But if I try to login, I get this TLS Error:
rlm_sql (sql): Released sql socket id: 3++[sql] returns okrad_check_password: Found Auth-Type EAPauth: type "EAP"+- entering group authenticaterlm_eap: Request found, released from the listrlm_eap: EAP/tlsrlm_eap: processing type tlsrlm_eap_tls: Authenticaterlm_eap_tls: processing TLS
eaptls_verify returned 7rlm_eap_tls: Done initial handshakerlm_eap_tls: <<< TLS 1.0 Handshake [length 0467], Certificate
--> verify error:num=18:self signed certificaterlm_eap_tls: >>> TLS 1.0 Alert [length 0002], fatal unknown_caTLS Alert write:fatal:unknown CATLS_accept:error in SSLv3 read client certificate Brlm_eap: SSL error error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned
rlm_eap_tls: SSL_read failed in a system call (-1), TLS session fails.eaptls_process returned 13rlm_eap: Freeing handler
++[eap] returns rejectauth: Failed to validate the user.Login incorrect: [julian/<via Auth-Type = EAP>] (from client GFS-03-01 port 286 cli 001e.5280.15c6)
Delaying reject of request 11 for 1 secondsGoing to the next request
But I don't know why freeradius has a problem with the ca cert.
thanks for helping me
Here's the startup log and the hole request:
startup.logStarting - reading configuration files ...including configuration file /etc/freeradius/radiusd.conf
including configuration file /etc/freeradius/proxy.confincluding configuration file /etc/freeradius/clients.confincluding configuration file /etc/freeradius/snmp.confincluding configuration file /etc/freeradius/eap.confincluding configuration file /etc/freeradius/sql.conf
including dictionary file /etc/freeradius/dictionarymain {prefix = "/usr"
localstatedir = "/var"logdir = "/var/log/freeradius"
libdir = "/usr/lib/freeradius"radacctdir = "/var/log/freeradius/radacct"
hostname_lookups = nomax_request_time = 30cleanup_delay = 5max_requests = 1024allow_core_dumps = no
pidfile = "/var/run/freeradius/freeradius.pid"user = "freerad"
group = "freerad"checkrad = "/usr/sbin/checkrad"
debug_level = 0proxy_requests = nosecurity {max_attributes = 200reject_delay = 1status_server = no}}client localhost {
ipaddr = 127.0.0.1require_message_authenticator = no
secret = "testing123"nastype = "other"
}client 172.17.255.1 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.2 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-02"
}client 172.17.255.3 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-03"
}client 172.17.255.4 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.5 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.6 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.11 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.12 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.13 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.14 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.15 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.16 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}client 172.17.255.21 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-03-01"
}client 172.17.255.22 {require_message_authenticator = no
secret = "4n3kc092ldnS3mfL2ndL"shortname = "GFS-01-01"
}radiusd: #### Loading Realms and Home Servers ####proxy server {retry_delay = 5retry_count = 3default_fallback = no
dead_time = 120wake_all_if_all_dead = no}home_server localhost {ipaddr = 127.0.0.1port = 1812type = "auth"secret = "testing123"
response_window = 20max_outstanding = 65536
zombie_period = 40status_check = "status-server"
ping_check = "none"
ping_interval = 30check_interval = 30num_answers_to_alive = 3num_pings_to_alive = 3revive_interval = 120
status_check_timeout = 4
}home_server_pool my_auth_failover {
type = fail-overhome_server = localhost}realm example.com {
auth_pool = my_auth_failover
}realm LOCAL {}radiusd: #### Instantiating modules ####instantiate {Module: Linked to module rlm_execModule: Instantiating execexec {
wait = yesinput_pairs = "request"shell_escape = yes}Module: Linked to module rlm_exprModule: Instantiating expr
}radiusd: #### Loading Virtual Servers ####
server {modules {
Module: Checking authenticate {...} for more modules to loadModule: Linked to module rlm_papModule: Instantiating pap
pap {encryption_scheme = "crypt"
auto_header = no
}Module: Linked to module rlm_chapModule: Instantiating chapModule: Linked to module rlm_mschapModule: Instantiating mschapmschap {use_mppe = yes
require_encryption = norequire_strong = nowith_ntdomain_hack = yes}Module: Linked to module rlm_unixModule: Instantiating unixunix {radwtmp = "/var/log/freeradius/radwtmp"}Module: Linked to module rlm_eapModule: Instantiating eapeap {default_eap_type = "tls"timer_expire = 60ignore_unknown_eap_types = nocisco_accounting_username_bug = no}Module: Linked to sub-module rlm_eap_md5Module: Instantiating eap-md5Module: Linked to sub-module rlm_eap_leap
Module: Instantiating eap-leapModule: Linked to sub-module rlm_eap_gtcModule: Instantiating eap-gtc
gtc {challenge = "Password: "
auth_type = "PAP"
}Module: Linked to sub-module rlm_eap_tls
Module: Instantiating eap-tlstls {rsa_key_exchange = no
dh_key_exchange = yesrsa_key_length = 512dh_key_length = 512verify_depth = 0pem_file_type = yes
private_key_file = "/etc/freeradius/certs2/server.key"
certificate_file = "/etc/freeradius/certs2/server.pem"
CA_file = "/etc/freeradius/certs2/ca.pem"
private_key_password = "whatever"
dh_file = "/etc/freeradius/certs2/dh"
random_file = "/etc/freeradius/certs2/random"
fragment_size = 1024
include_length = yescheck_crl = nocipher_list = "DEFAULT"}Module: Linked to sub-module rlm_eap_ttlsModule: Instantiating eap-ttlsttls {default_eap_type = "md5"copy_request_to_tunnel = nouse_tunneled_reply = novirtual_server = "inner-tunnel"
}Module: Linked to sub-module rlm_eap_peapModule: Instantiating eap-peappeap {default_eap_type = "mschapv2"copy_request_to_tunnel = no
use_tunneled_reply = noproxy_tunneled_request_as_eap = yesvirtual_server = "inner-tunnel"}Module: Linked to sub-module rlm_eap_mschapv2
Module: Instantiating eap-mschapv2mschapv2 {with_ntdomain_hack = no
}Module: Checking authorize {...} for more modules to loadModule: Linked to module rlm_preprocess
Module: Instantiating preprocesspreprocess {huntgroups = "/etc/freeradius/huntgroups"
hints = "/etc/freeradius/hints"with_ascend_hack = no
ascend_channels_per_line = 23with_ntdomain_hack = nowith_specialix_jetstream_hack = nowith_cisco_vsa_hack = nowith_alvarion_vsa_hack = no}Module: Linked to module rlm_realmModule: Instantiating suffixrealm suffix {format = "suffix"
delimiter = "@"ignore_default = noignore_null = no
}Module: Linked to module rlm_sqlModule: Instantiating sql
sql {
driver = "rlm_sql_mysql"server = "172.19.1.2"
port = ""login = "user"password = "9L2xWq"radius_db = "user"read_groups = yes
sqltrace = nosqltracefile = "/var/log/freeradius/sqltrace.sql"
readclients = nodeletestalesessions = yesnum_sql_socks = 5sql_user_name = "%{User-Name}"default_user_profile = ""
nas_query = "SELECT id,nasname,shortname,type,secret FROM nas"authorize_check_query = "SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id"
authorize_reply_query = "SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = '%{SQL-User-Name}' ORDER BY id"
authorize_group_check_query = "SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id"
authorize_group_reply_query = "SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id"
accounting_onoff_query = "UPDATE radacct SET AcctStopTime='%S', AcctSessionTime=unix_timestamp('%S') - unix_timestamp(AcctStartTime), AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}' WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= '%S'"
accounting_update_query = "UPDATE radacct SET FramedIPAddress = '%{Framed-IP-Address}', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress= '%{NAS-IP-Address}'"
accounting_update_query_alt = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0')"
accounting_start_query = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0')"
accounting_start_query_alt = "UPDATE radacct SET AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_start = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'"
accounting_stop_query = "UPDATE radacct SET AcctStopTime = '%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'"
accounting_stop_query_alt = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')"
group_membership_query = "SELECT GroupName FROM usergroup WHERE UserName='%{SQL-User-Name}'"connect_failure_retry_delay = 60simul_count_query = ""simul_verify_query = "SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol FROM radacct WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0"
postauth_query = "INSERT into radpostauth (id, user, pass, reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())"
safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"}
rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linkedrlm_sql (sql): Attempting to connect to user@172.19.1.2:/user
rlm_sql (sql): starting 0rlm_sql (sql): Attempting to connect rlm_sql_mysql #0rlm_sql_mysql: Starting connect to MySQL server for #0
rlm_sql (sql): Connected new DB handle, #0rlm_sql (sql): starting 1rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
rlm_sql_mysql: Starting connect to MySQL server for #1rlm_sql (sql): Connected new DB handle, #1rlm_sql (sql): starting 2
rlm_sql (sql): Attempting to connect rlm_sql_mysql #2rlm_sql_mysql: Starting connect to MySQL server for #2rlm_sql (sql): Connected new DB handle, #2rlm_sql (sql): starting 3rlm_sql (sql): Attempting to connect rlm_sql_mysql #3rlm_sql_mysql: Starting connect to MySQL server for #3rlm_sql (sql): Connected new DB handle, #3rlm_sql (sql): starting 4rlm_sql (sql): Attempting to connect rlm_sql_mysql #4rlm_sql_mysql: Starting connect to MySQL server for #4rlm_sql (sql): Connected new DB handle, #4
Module: Checking preacct {...} for more modules to loadModule: Linked to module rlm_acct_uniqueModule: Instantiating acct_unique
acct_unique {key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
}Module: Checking accounting {...} for more modules to loadModule: Linked to module rlm_detailModule: Instantiating detaildetail {detailfile = "/var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
header = "%t"detailperm = 384dirperm = 493locking = nolog_packet_header = no
}Module: Linked to module rlm_radutmpModule: Instantiating radutmpradutmp {filename = "/var/log/freeradius/radutmp"username = "%{User-Name}"
case_sensitive = yescheck_with_nas = yesperm = 384callerid = yes}Module: Checking session {...} for more modules to loadModule: Checking post-proxy {...} for more modules to loadModule: Checking post-auth {...} for more modules to load
}}radiusd: #### Opening IP addresses and Ports ####bind_address = *
WARNING: The directive 'bind_adress' is deprecated, and will be removed in future versions of FreeRADIUS. Please edit the configuration files to use the directive 'listen'.
main {snmp = nosmux_password = ""
snmp_write_access = no}Listening on authentication address * port 1812
Listening on accounting address * port 1813Ready to process requests.
request.lograd_recv: Access-Request packet from host 172.17.255.21 port 1645, id=68, length=364
User-Name = "julian"Framed-MTU = 1400Called-Station-Id = "0016.9cbf.bc40"Calling-Station-Id = "001e.5280.15c6"
Service-Type = Login-UserMessage-Authenticator = 0xb8af69f5c41127d504fdbc11340ef77e
EAP-Message = 0x020600d90d006ad75a8c33f431e52eb13d606916030100860f0000820080568392759081ec75c2e4ee2a000dbb18333895a786a217118fafd1e5c951c5845875cf1b37c9d271ef74447c5794ce6c49ddc0b93a7f70f6da7f4b92c388dc70dccb81cf00e0ef86be7b41ac0c3e06371d85def74b99c2b74e4ff45f39a8c2f3ae755b4cfc6ca2324a79ec2bbd9ba117d1fb4ca6a6f316eb99a07685ac4ad78114030100010116030100308f3fbc37134291724f1f6981dd100ad3c9fe8b77a57e94e11e59b89f738ed960768395779b6176a4443f1b98815e85b4
NAS-Port-Type = Wireless-802.11NAS-Port = 290NAS-Port-Id = "290"State = 0x81153e8b851333f6401c7fc382b600a0
NAS-IP-Address = 172.17.255.21NAS-Identifier = "gfs-wl-03-01"
+- entering group authorize++[preprocess] returns ok++[chap] returns noop++[mschap] returns nooprlm_realm: No '@' in User-Name = "julian", looking up realm NULLrlm_realm: No such realm "NULL"
++[suffix] returns nooprlm_eap: EAP packet type response id 6 length 217rlm_eap: No EAP Start, assuming it's an on-going EAP conversation
++[eap] returns updatedexpand: %{User-Name} -> julianrlm_sql (sql): sql_set_user escaped user --> 'julian'
rlm_sql (sql): Reserving sql socket id: 4expand: SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'julian' ORDER BY id
rlm_sql (sql): User found in radcheck tableexpand: SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = 'julian' ORDER BY id
expand: SELECT GroupName FROM usergroup WHERE UserName='%{SQL-User-Name}' -> SELECT GroupName FROM usergroup WHERE UserName='julian'
rlm_sql (sql): Released sql socket id: 4++[sql] returns okrad_check_password: Found Auth-Type EAP
auth: type "EAP"+- entering group authenticaterlm_eap: Request found, released from the list
rlm_eap: EAP/tlsrlm_eap: processing type tlsrlm_eap_tls: Authenticaterlm_eap_tls: processing TLSeaptls_verify returned 7rlm_eap_tls: Done initial handshakerlm_eap_tls: <<< TLS 1.0 Handshake [length 0467], Certificate
--> verify error:num=18:self signed certificaterlm_eap_tls: >>> TLS 1.0 Alert [length 0002], fatal unknown_caTLS Alert write:fatal:unknown CATLS_accept:error in SSLv3 read client certificate Brlm_eap: SSL error error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned
rlm_eap_tls: SSL_read failed in a system call (-1), TLS session fails.eaptls_process returned 13rlm_eap: Freeing handler
++[eap] returns rejectauth: Failed to validate the user.Login incorrect: [julian/<via Auth-Type = EAP>] (from client GFS-03-01 port 290 cli 001e.5280.15c6)
Delaying reject of request 10 for 1 secondsGoing to the next requestWaking up in 0.9 seconds.Sending delayed reject for request 10Sending Access-Reject of id 68 to 172.17.255.21 port 1645Framed-IP-Address = 172.17.8.165EAP-Message = 0x04060004
Message-Authenticator = 0x00000000000000000000000000000000Waking up in 3.9 seconds.Cleaning up request 9 ID 67 with timestamp +45Waking up in 1.0 seconds.Cleaning up request 10 ID 68 with timestamp +45Ready to process requests.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html