2014-04-11 187 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 
    } 
} 

到內部隧道服務器的授權部分。