Size: 10791
Comment:
|
Size: 11975
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 242: | Line 242: |
unix | |
Line 248: | Line 247: |
az autentikációs adatbázisát használjuk, a következő beállításokat végezzük el: | az autentikációs adatbázisát használjuk, a következő beállításokat használjuk: {{{ sql { driver = "rlm_sql_mysql" server = "mysql-server-host" login = "sql-user" password = "sql-user-password" radius_db = "postfilter" # vagy postfilter_replicated adatbázis replikált mySQL szerver esetében ... authcheck_table = "user" authreply_table = "user" ... sql_user_name = "%{User-Name}" ... authorize_check_query = "SELECT _userid, _address, \ 'Password', _passwd, '==' \ FROM ${authcheck_table} \ WHERE _address = '%{SQL-User-Name}' \ AND _passwd != '' \ ORDER BY _userid" authorize_reply_query = "SELECT _userid, _address, \ 'foo', 'foo', '==' \ FROM ${authcheck_table} \ WHERE _address = '__never_ever_match__'" authorize_group_check_query = "SELECT _userid, _address, \ 'foo', 'foo', '==' \ FROM ${authcheck_table} \ WHERE _address = '__never_ever_match__'" authorize_group_reply_query = "SELECT _userid, _address, \ 'foo', 'foo', '==' \ FROM ${authcheck_table} \ WHERE _address = '__never_ever_match__'" ... } }}} |
Freeradius konfigurálás
FreeRadius installáció
Installáljuk fel a kiszemelt Radius gépre a [http://www.freeradius.org/ FreeRadius] csomagot.
Access point konfiguráció
Feltételezve, hogy az Eduroamhoz használt access point IP címe a.b.c.d akkor a clients.conf fájlba a következőket kell írni:
client a.b.c.d { secret = <a secret password> shortname = <a name for your wireless AP> }
A secret password-nak meg kell egyeznie a secret password-el amit a wireless access point-on konfiguráltunk ehhez a radius szerverhez.
EAP mód konfiguráció
EAP/TTLS konfiguráció
Az eap.conf fájlba a következőket kell beírni:
eap { default_eap_type = tls timer_expire = 60 ignore_unknown_eap_types = no tls { private_key_file = <path to a private key for your Radius server> certificate_file = <path to the corresponding certificate file for the Radius server> CA_file = <path to the file containing the certificate of the Certificate Authority> dh_file = ${raddbdir}/certs/dh random_file = /dev/urandom fragment_size = 1024 include_length = yes copy_request_to_tunnel = no use_tunneled_reply = no } ttls { default_eap_type = md5 copy_request_to_tunnel = no use_tunneled_reply = no } }
Tanusítványt ugyanúgy lehet szerezni pl. az NIIF CA-tól mint EAP/TTLS esetében. Az, hogy az NIIF CA-tól legyen tanusítvány nem követelmény, mivel ezt a tanusítványt csak helyi felhasználók authentikációjakor fogja a rendszer használni a TLS tunnnel kiépítésekor. NIIF CA-tól beszerzett tanusítvány ajánlott, mert az együttmüködési tesztek könnyebben mennek és a felhasználóknak csak 1 gyökér tanusítványt kell telpíteniük.
Az TLS szekció pontos kitöltése nagyon fontos, különben nem fog müködni az authentikáció, mivel a TTLS a TLS helyes müködésére épít.
Az EAP-MD5 authentikáció alkalmazása nem ajánlott alapesetben, de mivel az authentikáció WPA/WPA2 segítségével és TLS tunnelben történik ezért elég megbizhatónak számít. Az egyéb lehetséges beállítások: CHAP, MSCHAPv2 ebben az esetben az authentikációs adatbázisban nyíltan kell tárolni a jelszavakat.
PEAP konfiguráció
Az eap.conf fájlba a következőket kell beírni:
eap { default_eap_type = tls timer_expire = 60 ignore_unknown_eap_types = no tls { private_key_file = <path to a private key for your Radius server> certificate_file = <path to the corresponding certificate file for the Radius server> CA_file = <path to the file containing the certificate of the Certificate Authority> dh_file = ${raddbdir}/certs/dh random_file = /dev/urandom fragment_size = 1024 include_length = yes copy_request_to_tunnel = no use_tunneled_reply = no } # The PEAP module needs the TLS module to be installed # and configured, in order to use the TLS tunnel # inside of the EAP packet. You will still need to # configure the TLS module, even if you do not want # to deploy EAP-TLS in your network. Users will not # be able to request EAP-TLS, as it requires them to # have a client certificate. EAP-PEAP does not # require a client certificate. # peap { # The tunneled EAP session needs a default # EAP type which is separate from the one for # the non-tunneled EAP module. Inside of the # PEAP tunnel, we recommend using MS-CHAPv2, # as that is the default type supported by # Windows clients. default_eap_type = mschapv2 } }
Tanusítványt ugyanúgy lehet szerezni pl. az NIIF CA-tól mint EAP/TTLS esetében. Az, hogy az NIIF CA-tól legyen tanusítvány nem követelmény, mivel ezt a tanusítványt csak helyi felhasználók authentikációjakor fogja a rendszer használni a TLS tunnnel kiépítésekor. NIIF CA-tól beszerzett tanusítvány ajánlott, mert az együttmüködési tesztek könnyebben mennek és a felhasználóknak csak 1 gyökér tanusítványt kell telpíteniük.
Az TLS szekció pontos kitöltése nagyon fontos, különben nem fog müködni az authentikáció, mivel a PEAP a TLS helyes müködésére épít.
A Tunnelen belül MSCHAPv2 authentikációt alkalmazzunk, mert így a Windows XP felhassználóknak nem kell újabb supplicant-et telpíteniük. MSCHAPv2 esetében az authentikációs adatbázisban nyíltan kell tárolni a jelszavakat.
Proxy konfiguráció
A proxy.conf fájlba a következöket kell beírni:
realm UP { type = radius authhost = radius1.eduroam.hu:1812 accthost = radius1.eduroam.hu:1813 secret = <shared secret with HU radius server> nostrip } realm UP { type = radius authhost = radius2.eduroam.hu:1812 accthost = radius2.eduroam.hu:1813 secret = <shared secret with HU radius server> nostrip }
Illetve a clients.conf fájlba:
client 195.111.98.4 { secret = <shared secret with HU radius server> shortname = radius1.eduroam.hu } client 195.111.98.12 { secret = <shared secret with HU radius server> shortname = radius2.eduroam.hu }
Freeradius modul és authentikáció konfiguráció
LDAP authentikációs adatbázis esetén
A radiusd.conf fájlban a következő modulok helyesen legyenek konfigurálva
modules { ... ldap { server = <"myldap.domain.hu"> identity = <"cn=admin,dc=domain,dc=hu"> password = <admin bind password> basedn = <"ou=people,dc=domain, dc=hu”> filter = "(uid=%{Stripped-User-Name:-%{User-Name}})" # If your LDAP server supports TLS you should use it start_tls = yes tls_cacertfile = <path to the certificate of the CA of your LDAP server certificate> tls_randfile = /dev/urandom # Itt szabályozható, hogy kinek van Eduroam hozzáférése access_attr = "dialupAccess" dictionary_mapping = ${raddbdir}/ldap.attrmap ldap_connections_number = 5 # Itt tároljuk a jelszavakat password_attribute = userPassword } ..... $INCLUDE ${confdir}/eap.conf ..... } .... authorize { preprocess auth_log eap files ldap } ... authenticate { Auth-Type PAP { pap } Auth-Type LDAP { ldap } eap }
password authentikációs adatbázis esetén
modules { # unix { # # # Define the locations of the normal passwd, shadow, and # group files. # To force the module to use the system password functions, # instead of reading the files, leave the following entries # commented out. # # This is required for some systems. # # passwd = /etc/passwd # shadow = /etc/shadow # group = /etc/group # radwtmp = ${logdir}/radwtmp } passwd etc_group { filename = /etc/group format = "=Group-Name:::*,User-Name" hashsize = 50 ignorenislike = yes allowmultiplekeys = yes delimiter = ":" } authenticate { Auth-Type PAP { pap } eap }
mySQL authentikációs adatbázis esetén
modules { ... $INCLUDE ${confdir}/sql.conf ... } .... authorize { preprocess auth_log eap sql files } ... authenticate { Auth-Type PAP { pap } eap } ...
Az sql.conf fájlban, amennyiben a [http://www.kfki.hu/cnc/projekt/postfilter/ Postfilter] csomagot és annak az autentikációs adatbázisát használjuk, a következő beállításokat használjuk:
sql { driver = "rlm_sql_mysql" server = "mysql-server-host" login = "sql-user" password = "sql-user-password" radius_db = "postfilter" # vagy postfilter_replicated adatbázis replikált mySQL szerver esetében ... authcheck_table = "user" authreply_table = "user" ... sql_user_name = "%{User-Name}" ... authorize_check_query = "SELECT _userid, _address, \ 'Password', _passwd, '==' \ FROM ${authcheck_table} \ WHERE _address = '%{SQL-User-Name}' \ AND _passwd != '' \ ORDER BY _userid" authorize_reply_query = "SELECT _userid, _address, \ 'foo', 'foo', '==' \ FROM ${authcheck_table} \ WHERE _address = '__never_ever_match__'" authorize_group_check_query = "SELECT _userid, _address, \ 'foo', 'foo', '==' \ FROM ${authcheck_table} \ WHERE _address = '__never_ever_match__'" authorize_group_reply_query = "SELECT _userid, _address, \ 'foo', 'foo', '==' \ FROM ${authcheck_table} \ WHERE _address = '__never_ever_match__'" ... }
Azonosítók feldolgozása
A users fájlban kell feldolgozni a bejövő kéréskeket és a szétdobálni a megfelelő radius proxy-knak: Minden userre illeszkedő szabályokat DEFAULT szabályokkal lehet csinálni:
pl. ha a felhasználó benne van a noradius group-ban (passwordos authentikáció) akkor nem használhatja a radius authentikációt:
DEFAULT Group == "noradius", Auth-Type := Reject Reply-Message = "Your account has been disabled."
pl. minden ami nem illeszkedik a domain1.hu-ra vagy domain2.hu ra el kell küldeni a felsőbb szintű proxynak, és ne is probálkozzon tovább a defualt bejegyzésekkel:
DEFAULT User-Name =~ "@", User-Name !~ "[\@\.]domain1.hu$|[\@\.]domain2.hu$", Proxy-To-Realm:= UP Fall-Through = No
Debughoz hozzunk létre egy felhasználót:
#teszt uesr for debugging debug User-Password == "nagyon titkos jelszo" Reply-Message = "Hello, %u, debug usage only!", Fall-Through = no
Az összes többi felhasználót helyileg authentikáljuk - suffix kezelést helyesen be kell állítani!!!:
DEFAULT Auth-Type = System Fall-Through = 1