I use : freeradius : version 0.9.2 Cisco IOS : version 12.1(12c)EA1 xsupplicant : version 0.8
thanks for your help,
See below logs and configs : ============================
Cisco log (with dot1x debug on)
-------------------------------
Dec 17 14:21:05.735: dot1x-reauthsm(Fa0/19): state INITIALIZE, event CONTROL, arg 0x0
Dec 17 14:21:05.735: dot1x-reauthsm(Fa0/19): reauth timer stopped
Dec 17 14:21:05.739: dot1x-core(Fa0/19): control event
Dec 17 14:21:05.739: dot1x-authsm(Fa0/19): state AUTHENTICATING, event CONTROL, arg 0x0
Dec 17 14:21:05.739: dot1x-besm(Fa0/19): state RESPONSE, event CONTROL, arg 0x0
Dec 17 14:21:05.739: dot1x-reauthsm(Fa0/19): state INITIALIZE, event CONTROL, arg 0x0
Dec 17 14:21:05.739: dot1x-reauthsm(Fa0/19): reauth timer stopped
Dec 17 14:21:05.739: dot1x-backend(Fa0/19): [51] starting aaa sequence
Dec 17 14:21:05.743: dot1x-backend(Fa0/19): [51] relaying EAP data from supplicant
Dec 17 14:21:05.743: dot1x-backend(Fa0/19): [51] starting login
Dec 17 14:21:05.743: dot1x-backend(Fa0/19): [51] login user chapalain, client ID 00-00-39-CA-03-3B
Dec 17 14:21:05.759: dot1x-backend(Fa0/19): [51] start_login returned GETDATA
Dec 17 14:21:05.759: dot1x-core(Fa0/19): RADIUS reply (2) received
Dec 17 14:21:05.759: dot1x-authsm(Fa0/19): state AUTHENTICATING, event SERVER_REPLY, arg 0x2
Dec 17 14:21:05.759: dot1x-besm(Fa0/19): state REQUEST, event ENTRY, arg 0x2
Dec 17 14:21:05.763: dot1x-core(Fa0/19): send EAPOL type=0, EAP code=1, id=127
Dec 17 14:21:05.763: dot1x-reauthsm(Fa0/19): state INITIALIZE, event SERVER_REPLY, arg 0x2
Dec 17 14:21:06.007: dot1x-core(Fa0/19): EAPOL pkt in
Dec 17 14:21:06.007: dot1x-core(Fa0/19): 00:00:39:CA:03:3B sent EAPOL type=0, EAP code=2, id=127
Dec 17 14:21:06.007: dot1x-authsm(Fa0/19): state AUTHENTICATING, event INPUT, arg 0x80B9A550
Dec 17 14:21:06.007: dot1x-besm(Fa0/19): state REQUEST, event INPUT, arg 0x80B9A550
Dec 17 14:21:06.007: dot1x-besm(Fa0/19): state RESPONSE, event ENTRY, arg 0x80B9A550
Dec 17 14:21:06.011: dot1x-reauthsm(Fa0/19): state INITIALIZE, event INPUT, arg 0x80B9A550
Dec 17 14:21:06.015: dot1x-core(Fa0/19): control event
Dec 17 14:21:06.015: dot1x-authsm(Fa0/19): state AUTHENTICATING, event CONTROL, arg 0x0
Dec 17 14:21:06.015: dot1x-besm(Fa0/19): state RESPONSE, event CONTROL, arg 0x0
Dec 17 14:21:06.015: dot1x-reauthsm(Fa0/19): state INITIALIZE, event CONTROL, arg 0x0
Dec 17 14:21:08.055: dot1x-backend(Fa0/19): [51] cont_login returned FAIL
Dec 17 14:21:08.055: dot1x-backend(Fa0/19): [51] cleaning up AAA context
Dec 17 14:21:08.055: dot1x-core(Fa0/19): RADIUS reply (1) received
Dec 17 14:21:08.055: dot1x-authsm(Fa0/19): state AUTHENTICATING, event SERVER_REPLY, arg 0x1
Dec 17 14:21:08.059: dot1x-besm(Fa0/19): state RESPONSE, event SERVER_REPLY, arg 0x1
Dec 17 14:21:08.059: dot1x-besm(Fa0/19): state FAIL, event ENTRY, arg 0x1
Dec 17 14:21:08.059: dot1x-core(Fa0/19): send EAPOL type=0, EAP code=4, id=127
Dec 17 14:21:08.059: dot1x-besm(Fa0/19): state IDLE, event ENTRY, arg 0x1
Dec 17 14:21:08.059: dot1x-reauthsm(Fa0/19): state INITIALIZE, event SERVER_REPLY, arg 0x1
Dec 17 14:21:08.063: dot1x-core(Fa0/19): control event
Dec 17 14:21:08.063: dot1x-authsm(Fa0/19): state AUTHENTICATING, event CONTROL, arg 0x0
Dec 17 14:21:08.063: dot1x-authsm(Fa0/19): state HELD, event ENTRY, arg 0x0
Dec 17 14:21:08.063: dot1x-core(Fa0/19): setting default host access to 1
Dec 17 14:21:08.063: dot1x-core(Fa0/19): deauthorized port
Dec 17 14:21:08.067: dot1x-besm(Fa0/19): state IDLE, event CONTROL, arg 0x0
Dec 17 14:21:08.067: dot1x-reauthsm(Fa0/19): state INITIALIZE, event CONTROL, arg 0x0
Dec 17 14:21:08.059: dot1x-core(Fa0/19): send EAPOL type=0, EAP code=4, id=127
Dec 17 14:21:08.059: dot1x-besm(Fa0/19): state IDLE, event ENTRY, arg 0x1
Dec 17 14:21:08.059: dot1x-reauthsm(Fa0/19): state INITIALIZE, event SERVER_REPLY, arg 0x1
Dec 17 14:21:08.063: dot1x-core(Fa0/19): control event
Dec 17 14:21:08.063: dot1x-authsm(Fa0/19): state AUTHENTICATING, event CONTROL, arg 0x0
Dec 17 14:21:08.063: dot1x-authsm(Fa0/19): state HELD, event ENTRY, arg 0x0
Dec 17 14:21:08.063: dot1x-core(Fa0/19): setting default host access to 1
Dec 17 14:21:08.063: dot1x-core(Fa0/19): deauthorized port
Dec 17 14:21:08.067: dot1x-besm(Fa0/19): state IDLE, event CONTROL, arg 0x0
Dec 17 14:21:08.067: dot1x-reauthsm(Fa0/19): state INITIALIZE, event CONTROL, arg 0x0
Dec 17 14:21:08.067: dot1x-reauthsm(Fa0/19): reauth timer stopped
Dec 17 16:18:30.748: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/19, changed state to down
Dec 17 16:52:33.988: %LINK-3-UPDOWN: Interface FastEthernet0/19, changed state to up
Dec 17 16:52:34.988: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/19, changed state to up
Dec 17 17:12:26.433: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/19, changed state to down
Freeradius log :
-------------------------------
/opt/freeradius-V0.9.2/sbin/radiusd -X -A
Starting - reading configuration files ...
reread_config: reading radiusd.conf
Config: including file: /opt/freeradius/etc/raddb/proxy.conf
Config: including file: /opt/freeradius/etc/raddb/clients.conf
Config: including file: /opt/freeradius/etc/raddb/snmp.conf
Config: including file: /opt/freeradius/etc/raddb/sql.conf
main: prefix = "/opt/freeradius"
main: localstatedir = "/opt/freeradius/var"
main: logdir = "/opt/freeradius/var/log/radius"
main: libdir = "/opt/freeradius/lib"
main: radacctdir = "/opt/freeradius/var/log/radius/radacct"
main: hostname_lookups = no
main: max_request_time = 30
main: cleanup_delay = 5
main: max_requests = 1024
main: delete_blocked_requests = 0
main: port = 1812
main: allow_core_dumps = no
main: log_stripped_names = yes
main: log_file = "/opt/freeradius/var/log/radius/radius.log"
main: log_auth = yes
main: log_auth_badpass = no
main: log_auth_goodpass = no
main: pidfile = "/opt/freeradius/var/run/radiusd/radiusd.pid"
main: user = "radiusd"
main: group = "radiusd"
main: usercollide = yes
main: lower_user = "no"
main: lower_pass = "no"
main: nospace_user = "no"
main: nospace_pass = "no"
main: checkrad = "/opt/freeradius/sbin/checkrad"
main: proxy_requests = yes
proxy: retry_delay = 5
proxy: retry_count = 3
proxy: synchronous = no
proxy: default_fallback = yes
proxy: dead_time = 120
proxy: post_proxy_authorize = yes
proxy: wake_all_if_all_dead = no
security: max_attributes = 200
security: reject_delay = 1
security: status_server = no
main: debug_level = 0
read_config_files: reading dictionary
read_config_files: reading naslist
Using deprecated naslist file. Support for this will go away soon.
read_config_files: reading clients
Using deprecated clients file. Support for this will go away soon.
read_config_files: reading realms
Using deprecated realms file. Support for this will go away soon.
radiusd: entering modules setup
Module: Library search path is /opt/freeradius/lib
Module: Loaded LDAP
ldap: server = "10.154.32.1"
ldap: port = 3268
ldap: net_timeout = 1
ldap: timeout = 4
ldap: timelimit = 3
ldap: identity = ""
ldap: start_tls = no
ldap: password = ""
ldap: basedn = "dc=platine,dc=org"
ldap: filter = "(cn=%u)"
ldap: default_profile = "(null)"
ldap: profile_attribute = "(null)"
ldap: password_header = "(null)"
ldap: password_attribute = "(null)"
ldap: access_attr = "dialupAccess"
ldap: groupname_attribute = "cn"
ldap: groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))"
ldap: groupmembership_attribute = "(null)"
ldap: dictionary_mapping = "/opt/freeradius/etc/raddb/ldap.attrmap"
ldap: ldap_debug = 0
ldap: ldap_connections_number = 5
ldap: compare_check_items = no
ldap: access_attr_used_for_allow = yes
conns: (nil)
rlm_ldap: reading ldap<->radius mappings from file /opt/freeradius/etc/raddb/ldap.attrmap
rlm_ldap: LDAP radiusCheckItem mapped to RADIUS $GENERIC$
rlm_ldap: LDAP radiusReplyItem mapped to RADIUS $GENERIC$
rlm_ldap: LDAP radiusAuthType mapped to RADIUS Auth-Type
rlm_ldap: LDAP radiusSimultaneousUse mapped to RADIUS Simultaneous-Use
rlm_ldap: LDAP radiusCalledStationId mapped to RADIUS Called-Station-Id
rlm_ldap: LDAP radiusCallingStationId mapped to RADIUS Calling-Station-Id
rlm_ldap: LDAP lmPassword mapped to RADIUS LM-Password
rlm_ldap: LDAP ntPassword mapped to RADIUS NT-Password
rlm_ldap: LDAP acctFlags mapped to RADIUS SMB-Account-CTRL-TEXT
rlm_ldap: LDAP radiusExpiration mapped to RADIUS Expiration
rlm_ldap: LDAP radiusServiceType mapped to RADIUS Service-Type
rlm_ldap: LDAP radiusFramedProtocol mapped to RADIUS Framed-Protocol
rlm_ldap: LDAP radiusFramedIPAddress mapped to RADIUS Framed-IP-Address
rlm_ldap: LDAP radiusFramedIPNetmask mapped to RADIUS Framed-IP-Netmask
rlm_ldap: LDAP radiusFramedRoute mapped to RADIUS Framed-Route
rlm_ldap: LDAP radiusFramedRouting mapped to RADIUS Framed-Routing
rlm_ldap: LDAP radiusFilterId mapped to RADIUS Filter-Id
rlm_ldap: LDAP radiusFramedMTU mapped to RADIUS Framed-MTU
rlm_ldap: LDAP radiusFramedCompression mapped to RADIUS Framed-Compression
rlm_ldap: LDAP radiusLoginIPHost mapped to RADIUS Login-IP-Host
rlm_ldap: LDAP radiusLoginService mapped to RADIUS Login-Service
rlm_ldap: LDAP radiusLoginTCPPort mapped to RADIUS Login-TCP-Port
rlm_ldap: LDAP radiusCallbackNumber mapped to RADIUS Callback-Number
rlm_ldap: LDAP radiusCallbackId mapped to RADIUS Callback-Id
rlm_ldap: LDAP radiusFramedIPXNetwork mapped to RADIUS Framed-IPX-Network
rlm_ldap: LDAP radiusClass mapped to RADIUS Class
rlm_ldap: LDAP radiusSessionTimeout mapped to RADIUS Session-Timeout
rlm_ldap: LDAP radiusIdleTimeout mapped to RADIUS Idle-Timeout
rlm_ldap: LDAP radiusTerminationAction mapped to RADIUS Termination-Action
rlm_ldap: LDAP radiusLoginLATService mapped to RADIUS Login-LAT-Service
rlm_ldap: LDAP radiusLoginLATNode mapped to RADIUS Login-LAT-Node
rlm_ldap: LDAP radiusLoginLATGroup mapped to RADIUS Login-LAT-Group
rlm_ldap: LDAP radiusFramedAppleTalkLink mapped to RADIUS Framed-AppleTalk-Link
rlm_ldap: LDAP radiusFramedAppleTalkNetwork mapped to RADIUS Framed-AppleTalk-Network
rlm_ldap: LDAP radiusFramedAppleTalkZone mapped to RADIUS Framed-AppleTalk-Zone
rlm_ldap: LDAP radiusPortLimit mapped to RADIUS Port-Limit
rlm_ldap: LDAP radiusLoginLATPort mapped to RADIUS Login-LAT-Port
conns: 0x811d1f8
Module: Instantiated ldap (ldap)
Module: Loaded eap
eap: default_eap_type = "md5"
eap: timer_expire = 60
rlm_eap: Loaded and initialized the type md5
Module: Instantiated eap (eap)
Module: Loaded preprocess
preprocess: huntgroups = "/opt/freeradius/etc/raddb/huntgroups"
preprocess: hints = "/opt/freeradius/etc/raddb/hints"
preprocess: with_ascend_hack = no
preprocess: ascend_channels_per_line = 23
preprocess: with_ntdomain_hack = no
preprocess: with_specialix_jetstream_hack = no
preprocess: with_cisco_vsa_hack = no
Module: Instantiated preprocess (preprocess)
Module: Loaded realm
realm: format = "suffix"
realm: delimiter = "@"
Module: Instantiated realm (suffix)
Module: Loaded files
files: usersfile = "/opt/freeradius/etc/raddb/users"
files: acctusersfile = "/opt/freeradius/etc/raddb/acct_users"
files: preproxy_usersfile = "/opt/freeradius/etc/raddb/preproxy_users"
files: compat = "no"
Module: Instantiated files (files)
Module: Loaded detail
detail: detailfile = "/opt/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail"
detail: detailperm = 384
detail: dirperm = 493
detail: locking = no
Module: Instantiated detail (detail)
Module: Loaded radutmp
radutmp: filename = "/opt/freeradius/var/log/radius/radutmp"
radutmp: username = "%{User-Name}"
radutmp: case_sensitive = yes
radutmp: check_with_nas = yes
radutmp: perm = 384
radutmp: callerid = yes
Module: Instantiated radutmp (radutmp)
Listening on IP address *, ports 1812/udp and 1813/udp, with proxy on 1814/udp.
Ready to process requests.
rad_recv: Access-Request packet from host 10.154.253.18:1812, id=151, length=114 NAS-IP-Address = 10.154.253.18
NAS-Port = 50019
NAS-Port-Type = Ethernet
User-Name = "chapalain"
Calling-Station-Id = "00-00-39-CA-03-3B"
Service-Type = Framed-User
Framed-MTU = 1500
EAP-Message = 0x027e000e0163686170616c61696e
Message-Authenticator = 0x04c1588c53aca1c9578de28511f82ef6
modcall: entering group authorize for request 0
modcall[authorize]: module "preprocess" returns ok for request 0
rlm_eap: EAP packet type notification id 126 length 14
rlm_eap: EAP Start not found
modcall[authorize]: module "eap" returns updated for request 0
rlm_realm: No '@' in User-Name = "chapalain", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop for request 0
users: Checking chapalain at 426
rad_check_password: Found Auth-Type eap
auth: type "EAP"
modcall: entering group authenticate for request 0
rlm_eap: EAP packet type notification id 126 length 14
rlm_eap: EAP Start not found
rlm_eap: EAP Identity
rlm_eap: processing type md5
rlm_eap_md5: Issuing Challenge
modcall[authenticate]: module "eap" returns ok for request 0
modcall: group authenticate returns ok for request 0
users: Matched chapalain at 426
modcall[authorize]: module "files" returns ok for request 0
modcall: group authorize returns updated for request 0
rad_check_password: Found Auth-Type eap
auth: type "EAP"
modcall: entering group authenticate for request 0
rlm_eap: EAP packet type notification id 126 length 14
rlm_eap: EAP Start not found
rlm_eap: EAP Identity
rlm_eap: processing type md5
rlm_eap_md5: Issuing Challenge
modcall[authenticate]: module "eap" returns ok for request 0
modcall: group authenticate returns ok for request 0
Login OK: [chapalain] (from client Switch-siege port 50019 cli 00-00-39-CA-03-3B)
Sending Access-Challenge of id 151 to 10.154.253.18:1812
EAP-Message = 0x017f0016041020ec1cf4ca5fa2d53f037eddbd6483f9
Message-Authenticator = 0x00000000000000000000000000000000
State = 0x67621a094fd6c44631815f5ccd1fcbd74158e03f010d7a2e4ce33109193f719fd5686cac
Service-Type = Framed-User
EAP-Message = 0x017f00160410d3c7642ed9187bd8355cc4ddc225ef2d
State = 0xbade83157263d2ec150a18203b8626f34158e03f472910589e1424d30f40982cf3424598
Finished request 0
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
rad_recv: Access-Request packet from host 10.154.253.18:1812, id=152, length=170
NAS-IP-Address = 10.154.253.18
NAS-Port = 50019
NAS-Port-Type = Ethernet
User-Name = "chapalain"
Calling-Station-Id = "00-00-39-CA-03-3B"
Service-Type = Framed-User
Framed-MTU = 1500
State = 0xbade83157263d2ec150a18203b8626f34158e03f472910589e1424d30f40982cf3424598
EAP-Message = 0x027f002004107da94c3d2d91483d0fc0355a5f77e0bf63686170616c61696e00
Message-Authenticator = 0xe2ca7132d32c120a44c29bff39f71685
modcall: entering group authorize for request 1
modcall[authorize]: module "preprocess" returns ok for request 1
rlm_eap: EAP packet type notification id 127 length 32
rlm_eap: EAP Start not found
modcall[authorize]: module "eap" returns updated for request 1
rlm_realm: No '@' in User-Name = "chapalain", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop for request 1
users: Checking chapalain at 426
rad_check_password: Found Auth-Type eap
auth: type "EAP"
modcall: entering group authenticate for request 1
rlm_eap: EAP packet type notification id 127 length 32
rlm_eap: EAP Start not found
rlm_eap: Request not found in the list
rlm_eap: Either EAP-request timed out OR EAP-response to an unknown EAP-request
modcall[authenticate]: module "eap" returns invalid for request 1
modcall: group authenticate returns invalid for request 1
users: Matched DEFAULT at 458
modcall[authorize]: module "files" returns ok for request 1
modcall: group authorize returns updated for request 1
rad_check_password: Found Auth-Type Reject
rad_check_password: Auth-Type = Reject, rejecting user
auth: Failed to validate the user.
Login incorrect: [chapalain] (from client Switch-siege port 50019 cli 00-00-39-CA-03-3B)
Delaying request 1 for 1 seconds
Finished request 1
Going to the next request
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Sending Access-Reject of id 152 to 10.154.253.18:1812
Reply-Message = "Authentification failed (Warning ! Authorized Users only !)"
Waking up in 3 seconds...
--- Walking the entire request list ---
Cleaning up request 0 ID 151 with timestamp 3fe05841
Waking up in 1 seconds...
--- Walking the entire request list ---
Cleaning up request 1 ID 152 with timestamp 3fe05842
Nothing to do. Sleeping until we see a request.
Xsupplicant output : ------------------------------- xsupplicant -p "jjjjjjjj" Password passed in from command line! (This isn't very secure!) Calling do_eapol, with device eth0 Setup on device eth0 complete Done with init. Sending EAPOL-Start #1 Failed to turn off WEP: error 1 Connection Established, authenticating... Failed to Authenticate Sending EAPOL-Start #1 Sending EAPOL-Start #2 Failed to Authenticate Failed to turn off WEP: error 1 Connection Established, authenticating... Failed to turn off WEP: error 1 Connection Established, authenticating... Failed to Authenticate Sending EAPOL-Start #1 Sending EAPOL-Start #2 No authenticator found! Assuming the port is authorized!
Cisco config : ------------------------------- interface FastEthernet0/19 description --- Test 802.1x --- switchport mode access no ip address duplex full speed 100 dot1x port-control auto
Xsupplicant config : ------------------------------- /etc/1x/1x.conf default:id = chapalain #comment here default:auth = EAP default:type = wireless default : pref = md5 default : chunk_size = 1398 default : random_file = /dev/random default : first_auth = "/sbin/dhclient eth0" default : after_auth = "/bin/echo I authenticated"
FreeRadius Config : freeradius/etc/radb/users ------------------------------- chapalain Auth-type := eap, User-Password == "jjjjjjjj" Service-Type = Framed-User
freeradius/etc/radb/radius.conf ------------------------------- .../... # # For all EAP related authentications eap { # Supported EAP-types md5 { } } .../... authorize {
preprocess
eap suffix suffix files
}
.../...
authenticate { # Uncomment it if you want to use ldap for authentication authtype LDAP { ldap }
eap }
-- -- Jean-Paul Chapalain - GICM - Resp. Reseaux et Infrastructure -- 32 rue Mirabeau - Le Relecq-Kerhuon - 29808 Brest Cedex 9, FRANCE -- Tel +33298002873 - Fax +33298284005 - [EMAIL PROTECTED] -- Key Fingerprint: 192C 1CFE F24A 050D F280 A086 AF15 8631 3ABB 4C7D
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html