2014-04-11 138 views
2

我需要帮助配置freeradius与WPA2企业通过LDAP。配置FreeRadius与LDAP的WPA2企业

LDAP通常适用于其他服务,但它不适用于WPA2E。

我们还管理WPA2E以使用硬编码的用户名/密码。所以我们知道他们自己工作中的所有组件,但不能一起工作。

我们将freeradius服务器配置得很好,可以使用LDAP服务。

任何帮助表示赞赏

这里是我的自由半径模块/ LDAP文件(主要是无关的这个问题)

ldap { 
    server = "ldapmaster.domain.com,ldapslave.domain.com" 
    identity = "uid=binder,ou=services,dc=security,dc=domain,dc=com" 
    password = asdfasdfasdf 
    basedn = "ou=internal,ou=users,dc=security,dc=domain,dc=com" 
    filter = "(mail=%{%{Stripped-User-Name}:-%{User-Name}})" 
    ldap_connections_number = 5 
    max_uses = 0 
    timeout = 4 
    timelimit = 3 
    net_timeout = 1 

    tls { 
      start_tls = yes 
      require_cert = "never" 
    } 

    dictionary_mapping = ${confdir}/ldap.attrmap 
    password_attribute = userPassword 
    edir_account_policy_check = no 

    keepalive { 
      idle = 60 
      probes = 3 
      interval = 3 
    }} 

也有eap.conf

以下设置LDAP设置
eap { 
default_eap_type = peap 
timer_expire  = 60 
ignore_unknown_eap_types = no 
cisco_accounting_username_bug = no 
max_sessions = 4096 

md5 { 
} 

leap { 
} 

gtc { 
     auth_type = PAP 
} 

tls { 
     certdir = ${confdir}/certs 
     cadir = ${confdir}/certs 
     private_key_password = whatever 
     private_key_file = ${certdir}/server.key 
     certificate_file = ${certdir}/server.pem 
     CA_file = ${cadir}/ca.pem 
     dh_file = ${certdir}/dh 
     random_file = /dev/urandom 
     CA_path = ${cadir} 
     cipher_list = "DEFAULT" 
     make_cert_command = "${certdir}/bootstrap" 

     cache { 
       enable = no 
       max_entries = 255 
     } 

     verify { 
     } 
} 

ttls { 
     default_eap_type = md5 
     copy_request_to_tunnel = no 
     use_tunneled_reply = no 
     virtual_server = "inner-tunnel" 
} 


peap { 
     default_eap_type = mschapv2 
     copy_request_to_tunnel = no 
     use_tunneled_reply = no 
     virtual_server = "inner-tunnel" 
} 

mschapv2 { 
}} 

还有两个站点启用,默认和内部隧道:

默认

authorize { 
    preprocess 
    suffix 
    eap { 
     ok = return 
    } 
    expiration 
    logintime 
    ldap 
} 
authenticate { 
    eap 
    ldap 
} 

内隧道

authorize { 
    mschap 
    update control { 
      Proxy-To-Realm := LOCAL 
    } 
    eap { 
     ok = return 
    } 
    expiration 
    ldap 
    logintime 
} 
authenticate { 
    Auth-Type MS-CHAP { 
     mschap 
    } 
    eap 
    ldap 
} 

下面是一个简单的日志,我在调试日志中看到:

https://gist.github.com/anonymous/10483144

回答

1

你似乎sites-available/inner-tunnel之间移除的符号链接和sites-enabled/inner-tunnel

如果您查看日志,则表示它无法找到内部隧道服务器,它需要在PEAP身份验证的TLS隧道中执行MSCHAPv2身份验证。

server { 
    PEAP: Setting User-Name to [email protected] 
Sending tunneled request 
     EAP-Message = 0x0205001a01656d72654071756269746469676974616c2e636f6d 
     FreeRADIUS-Proxied-To = 127.0.0.1 
     User-Name = "[email protected]" 
server inner-tunnel { 
No such virtual server "inner-tunnel" 
} # server inner-tunnel 

您添加符号链接后面,并在内部隧道服务器的授权部分的顶部列出LDAP模块。您还需要使用ldap attrmap文件将保存用户Cleartext-Password的属性映射到User-Password属性。

如果在目录中没有用户的Cleartext-Password(例如,如果它被哈希),那么您应该使用EAP-TTLS-PAP,并在内部隧道服务器的authenticate部分列出LDAP模块,然后添加:

if (User-Password) { 
    update control { 
     Auth-Type := LDAP 
    } 
} 

到内部隧道服务器的授权部分。