IMPORTANT: Per accedir als fitxer de subversion: http://acacha.org/svn (sense password). Poc a poc s'aniran migrant els enllaços. Encara però funciona el subversion de la farga però no se sap fins quan... (usuari: prova i la paraula de pas 123456)
RADIUS
|
Navegació: Què enllaça aquí | Pàgines Filles | |
|---|---|
| Web: | freeradius.org |
| Desenvolupadors: | |
| Tipus: | AAA |
| Sistema operatiu: | Unix-like |
| Creadors: | |
http://books.google.es/books?id=cReeiIWc_Q0C&pg=PT184&lpg=PT184&dq=freeradius+accounting+listen+section&source=bl&ots=LX93zITcFR&sig=_DwEfoY3GWvwHplxgrBtMui323o&hl=en&sa=X&ei=J7veT-3dHov1sgbR66mqDQ&redir_esc=y#v=onepage&q=freeradius%20accounting%20listen%20section&f=false
RADIUS (Remote Authentication Dial-In User Server) és un protocol d'autenticació i autorització per a aplicacions d'accés a la xarxa o mobilitat IP.
Permet centralitzar l'accés a una xarxa guardant totes les dades d'accés en un servidor centralitzat anomenat NAS (Servidor d'Accés a la Xarxa o Network Access Server (NAS)). Els usuaris es poden guardar en fitxers de text, bases de dades, LDAP, etc.
RADIUS
Els servidors Radius són força utilitzats per les ISPs per autenticar als clients. Quan es realitza una connexió PPP s'utilitza un usuari i una paraula de pas per fer la connexió. Aquesta informació es transferida des del dispositiu de connexió del client (CPE) a un Network Access Server (NAS) mitjançant el protocol PPP, i el NAS redirigeix la petició a un servidor RADIUS. El servidor RADIUS comprova que la informació és correcta utilitzant esquemes d'autenticació com PAP, CHAP o EAP. Si el usuari és acceptat, el servidor autoritza l'accés al sistema del ISP i li assigna els recursos de xarxa pertinents com una adreça IP o altres paràmetres com L2TP, etc.
Uba de les característiques més importants de RADIUS és la seva capacitat de gestionar sessions, notificant quan comença i quan acaba la connexió de forma que al usuari si li podrà determinar el consum i facturar en conseqüència o simplement tenir estadístiques del sistema.
RADIUS va ser desenvolupat originalment per Livingston Enterprises per a la sèrie de servidors NAS PortMaster. Més tard es va estandaritzar amb la publicació dels RFC 2138 i RFC 2139.
Actualment existeixen múltiples servidors Radius, tant comercials com de codi obert. Les prestacions poden variar però la majoria poden gestionar els usuaris en fitxers de text, servidors Ldap o bases de dades varies.
Sovint s'utilitza SNMP per a monitoritzar remotament el servei. Els servidors Proxy RADIUS s'utilitzen per a una administració centralitzada i poden reescriure paquets Radius on the fly.
RADIUS és extensible; la majoria de fabricants de programari i maquinari implementen els seu propis dialectes (que no solen ser estàndards)
Protocols d'autenticació
Arquitectura i components
RADIUS és un protocol client/servidor que s'executa a la capa d'aplicació utilitzant com a protocol de transport UDP. Els components que formen part d'un sistema Radius (aka Radius Infrastructure) son (o poden ser):
- Access clients: Un client d'accés és un dispositiu que requereix d'un cert nivell d'accés a una xarxa més gran. Exemples:
- Access servers (RADIUS clients): aka Remote Access Server. Un servidor d'accés és un dispositiu que proveïx ce cert nivell d'accés a una xarxa més gran. Un access server dins d'una infraestructura radius també es conegut com a client Radius que envia peticions de connexió i missatges d'accounting a un servidor Radius. Exemples de servidors d'accés:
- Network access servers o NAS: són dispositius pròpiament servidors, que proveïxen de connectivitat a la xarxa d'una organització o a Internet. Per exemple un Virtual Private Network server
- Wireless access points: són punts d'accés WIFI que controlen l'accés a la xarxa WIFI amb usuaris i paraules de pas amb sistemes com WPA. Un exemple és el sistema Eduroam.
- Network Switches: Commutadors de xarxa que proveïxen d'accés físic a la xarxa d'una organització utilitzant tecnologies LAN com Ethernet
- User account databases: Són les bases de dades on es guarda la informació dels usuaris i són consultades pels servidors radius per tal de validar les credencials d'autenticació i també poden proporcionar paràmetres relatius a la connexió (adreça IP, límits en l'ampla de banda o similars). Poden estar en formats simples com un fitxer de text, o en base de dades relacionals (MySQL, PostgreSQL o similars) o bases de dades jeràrquiques p.ex. (Ldap). El servidor freeradius és un sistema modular que permet activar mòduls específics per a cada tipus de base de dades (vegeu freeradius-ldap o freeradius-mysql)
- RADIUS servers: Un servidor Radius és un dispositiu que rep i processa peticions de connexió procedents de clients Radius o Proxies Radius
- RADIUS proxies: Un proxy radius és un dispositiu que reenvia i encamina (forward) peticions de connexió Radius provinents d'un client Radius cap a un servidor Radius centralitzat. S'utilitza informació com els atributs Radius User-Name o el Called-Station-ID per tal d'encaminar les peticions cap al servidor Radius més adequat. S'utilitzen també per a fer autenticacions entre diferents organitzacions.
Tots aquests dispositius són tots gateways que controlen l'accés a la xarxa i tots solen tenir el seu component client Radius que es comunica amb el servidor Radius.
RADIUS té 3 funcions conegudes com la triple A (AAA) :
- Autentication: Autenticar als usuaris i/o els dispositius abans de garantir-los accés a la xarxa.
- Autorization: Autoritzar als usuaris o dispositius a accedir a certs serveis de xarxa
- Accounting: Fer l'accounting de l'ús d'aquests serveis
Atributs RADIUS
Protocol PPP
TODO:
TODO: In the case of connection requests, the RADIUS server processes the list of RADIUS attributes in the connection request. Based on a set of rules and the information in the user account database, the RADIUS server either authenticates and authorizes the connection and sends back an Access-Accept message or sends back an Access-Reject message. The Access-Accept message can contain connection restrictions that are implemented by the access server for the duration of the connection. User account databases
Client radius. freeradius-utils
Instal·lació
$ sudo apt-get install freeradius-utils ... S'instal·laran els següents paquets extres: freeradius-common libfreeradius2
Fitxers instal·lats:
$ dpkg -L freeradius-utils /. /usr /usr/bin /usr/bin/rlm_dbm_cat /usr/bin/rlm_dbm_parser /usr/bin/radeapclient /usr/bin/rlm_ippool_tool /usr/bin/smbencrypt /usr/bin/radclient /usr/bin/radwho /usr/bin/radsniff /usr/bin/radlast /usr/bin/radtest /usr/bin/radzap /usr/bin/radsqlrelay /usr/share /usr/share/doc /usr/share/doc/freeradius-utils /usr/share/doc/freeradius-utils/changelog.gz /usr/share/doc/freeradius-utils/copyright /usr/share/doc/freeradius-utils/changelog.Debian.gz /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/freeradius-utils
Ordres
TODO
/usr/bin/rlm_dbm_cat
/usr/bin/rlm_dbm_parser
/usr/bin/radeapclient
/usr/bin/rlm_ippool_tool
/usr/bin/smbencrypt
/usr/bin/radclient
/usr/bin/radwho
/usr/bin/radsniff
/usr/bin/radlast
/usr/bin/radtest
Segons el manual:
$ man radtest
RADTEST(1) FreeRADIUS Daemon RADTEST(1)
NAME
radtest - send packets to a RADIUS server, show reply
Servei per enviar paquets Radius al servidor i mostrar la resposta per part del servidor. El format és el següent:
$ radtest Usage: radtest user passwd radius-server[:port] nas-port-number secret [ppphint] [nasname]
On:
- user: és el nom d'un usuari vàlid. Els usuaris es busquen a les bases de dades de comptes d'usuari, en el cas més senzill l'usuari es troba al fitxer /etc/freeradius/users
- passwd: Paraula de pas de l'usuari indicat al camp anterior
- radius-server[:port]: Adreça IP o nom de màquina del servidor Radius. El port és opcional i només cal posar-lo si no és el port per defecte (1812)
- nas-port-number: és un valor que no té cap mena de rellevància. Normalment es posa 10
- secret: Paraula de pas necessari per tal que el client radius pugui accedir al servidor radius. L'accés dels NAS al servidor es controla al fitxer /etc/freeradius/clients.conf
- ppphint: Si es posa un enter major de 0, aleshores s'afegirà el atribut Framed-Protocol = PPP al paquet de petició
- nasname: Si el valor està present, indica l'adreça IP del NAS que fa la petició (NAS-IP-Address attribute). Si no s'indica res s'agafa el valor de hostname local
Per exemple per a prova l'usuari testing amb la paraula de pas password al servidor local (127.0.0.1):
IMPORTANT: La paraula de pas testing123 és el secret compartit (shared) per defecte per tal de fer proves des de localhost. Vegeu RADIUS#Configuraci.C3.B3_per_defecte
$ radtest testing password 127.0.0.1 0 testing123 Sending Access-Request of id 178 to 127.0.0.1 port 1812 User-Name = "testing" User-Password = "password" NAS-IP-Address = 127.0.0.1 NAS-Port = 0 rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=178, length=20
Amb qualsevol altre paraula de pas de client NAS:
sergi@sergi-P5E-WS-Pro:~$ radtest testing password 127.0.0.1 0 parauladepaserronia ... rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=160, length=20
El resultat és un Access-Reject.
/usr/bin/radzap
/usr/bin/radsqlrelay
Servidor radius. Freeradius
The FreeRADIUS Project és el projecte que crea el software FreeRADIUS el qual proveïx els següents components:
- RADIUS server: Sovint al utilitzar la paraula FreeRadius s'està fent referència només a aquest component. Paquet Ubuntu: freeradius-*
- Llibreria client: amb llicència BSD. Aquesta llibreria es pot instal·lar en qualsevol tipus de dispositiu client
- Llibreria PAM: Paquet Ubuntu: libpam-radius-auth ( The PAM RADIUS authentication module)
- Apache module: Paquet Ubuntu: libapache2-mod-auth-radius
FreeRADIUS és el servidor de RADIUS més utilitzat al mon. És la base de múltiples productes comercials i proveïx del servei triple A (AAA) a més de Fortune-500 companyies i proveïdors d'accés de capa 1 (Tier 1 ISPs). També es molt utilitzat en el món acadèmic, per exemple amb el projecte eduroam.
El servidor és ràpid, amb múltiples característiques, modular i escalable.
La web del projecte és:
http://freeradius.org//
Els trobareu disponible als repositoris oficials d'Ubuntu:
$ sudo apt-cache search freeradius freeradius - a high-performance and highly configurable RADIUS server
Instal·lació
$ sudo apt-get install freeradius ... Paquets suggerits: freeradius-ldap freeradius-postgresql freeradius-mysql freeradius-krb5 S'instal·laran els paquets NOUS següents: freeradius 0 actualitzats, 1 nous a instal·lar, 0 a suprimir i 1 no actualitzats. Es necessita obtenir 645kB d'arxius. Després d'aquesta operació s'empraran 2343kB d'espai en disc addicional. Bai:1 http://es.archive.ubuntu.com/ubuntu/ maverick/main freeradius amd64 2.1.9+dfsg-1ubuntu1 [645kB] 645kB baixats en 0s (1952kB/s) S'està seleccionant el paquet freeradius prèviament no seleccionat. (S'està llegint la base de dades … hi ha 332996 fitxers i directoris instal·lats actualment.) S'està desempaquetant freeradius (de …/freeradius_2.1.9+dfsg-1ubuntu1_amd64.deb) … S'estan processant els activadors per a ureadahead … S'està configurant freeradius (2.1.9+dfsg-1ubuntu1) … dpkg-statoverride: avís: s'ha donat --update però /var/run/freeradius no existeix dpkg-statoverride: avís: s'està suprimint la / de davant dpkg-statoverride: avís: s'està suprimint la / de davant dpkg-statoverride: avís: s'està suprimint la / de davant Updating default SSL certificate settings, if any... S'està afegint l'usuari freerad al grup ssl-cert Generating DH parameters, 1024 bit long safe prime, generator 2 This is going to take a long time ... * Starting FreeRADIUS daemon freeradius
Control del servei
Es fa utilitzant l'script System V:
$ sudo /etc/init.d/freeradius Usage: /etc/init.d/freeradius start|stop|restart|force-reload
Per exemple per aplicar els canvis de fitxers de configuració cal fer:
$ sudo /etc/init.d/freeradius restart
Ports
Radius utilitza el port 1812 UDP per a establir connexions d'autenticació i el port 1813 per l'accounting.
$ cat /etc/services | grep radius datametrics 1645/tcp old-radius datametrics 1645/udp old-radius radius 1812/tcp radius 1812/udp radius-acct 1813/tcp radacct # Radius Accounting radius-acct 1813/udp radacct
Podeu comprovar el port amb nmap:
NOTA: Fitxeu-vos l'ús de -sU per tal de fer un escànner de ports UDP i la necessitat de ser superusuari.
$ sudo nmap -sU localhost -p 1812 Starting Nmap 5.21 ( http://nmap.org ) at 2011-12-08 11:56 CET Nmap scan report for localhost (127.0.0.1) Host is up (1.0s latency). Hostname localhost resolves to 2 IPs. Only scanned 127.0.0.1 rDNS record for 127.0.0.1: localhost.localdomain PORT STATE SERVICE 1812/udp open radius Nmap done: 1 IP address (1 host up) scanned in 2.15 seconds
Execució en mode depuració
$ sudo freeradius -X
Configuració
IMPORTANT: En molta de la documentació disponible per Internet veure que parlen de la carpeta /etc/raddb o simplement que parlen del servidor raddb en comptes de freeradius. Aquest era el nom que tenia anteriorment!
Fitxer principal de configuració. /etc/freeradius/radiusd.conf
El fitxer principal de configuració és:
/etc/freeradius/radiusd.conf
Podeu consultar el manual:
$ man radiusd
Gestió d'usuaris
El fitxer principal de configuració dels usuaris Radius és:
/etc/freeradius/users
Es pot obtenir més informació a:
$ man 5 users
Com és habitual amb radius, el propi fitxer de configuració té molt informació important ens els comentaris del propi fitxer.
I llegint el fitxer:
/usr/share/doc/freeradius/processing_users_file
El contingut del qual és:
How is the USERS file processed? After the items of a request have been mangled by the "hints" and "huntgroups" files, the users file is processed. A request has initially an empty check list and an empty reply list attached to it. So each request has 3 A/V pairlists associated with it - the request list (as originated from the terminal server) - the check list (initially empty) - the reply list (initially empty)
For every entry in the users file, the Username VP (Value-Pair) is checked. If it matches or it is a DEFAULT entry, a check pairlist is created (call it tmpcheck) by adding the check pairlist of the current usersfile entry to the check pairlist of the request. If an attribute is already present in the check pairlist of the request it will not be changed (see files.c:movepair). Then the request pairlist is compared with the tmpcheck pairlist. If all items match (except for password-related items at this time!) the following actions are taken: - The reply pairlist of the usersfile entry is appended to the reply pairlist of the request - The check pairlist of the request is replaced by the tmpcheck pairlist (this is the same as: the check pairlist from the usersfile entry is appended to the pairlist of the request) Then a check is made to see if the reply pairlist contains an A-V pair of "Fall-Through = Yes". If so, the next entry in the usersfile is processed as above. If not, we stop processing the users file. Then after all this is done, the Authentication information is filtered from the check pairlist, the password of the users is checked, and we send a reply back to the terminal server.
i
http://freeradius.org/doc/
Comencem amb un exemple senzill:
Afegiu l'usuari testing amb la paraula de pas password. Al fitxer /etc/freeradius/users afegiu al principi de tot:
testing Cleartext-Password := "password"
Apliqueu els canvis i comproveu l'usuari amb radtest.
$ sudo /etc/init.d/freeradius restart * Stopping FreeRADIUS daemon freeradius [ OK ] * Starting FreeRADIUS daemon freeradius [ OK ] $ radtest testing password 127.0.0.1 0 testing123 Sending Access-Request of id 178 to 127.0.0.1 port 1812 User-Name = "testing" User-Password = "password" NAS-IP-Address = 127.0.0.1 NAS-Port = 0 rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=178, length=20
Observeu el Access-Accept. En canvi:
$ radtest testing password1 127.0.0.1 0 testing123 ... rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=172, length=20
Ara anem a veure com es poden afegir atributs a un usuari, la sintaxi és una mica especial però anem a afegir dos atributs a l'usuari testing:
$ sudo joe /etc/freeradius/users ... testing Cleartext-Password := "password" Mikrotik-Group = admin, Reply-Message = "Welcome admin"
Observeu com el primer atribut està separat per := però la resta només per un =. També observer com a partir del segon atribut es separen per una coma ,. Un cop fet el canvi reinicieu el servidor:
$ sudo /etc/init.d/freeradius restart
Si ara executeu radtest:
$ radtest testing password 127.0.0.1 0 testing123 Sending Access-Request of id 165 to 127.0.0.1 port 1812 User-Name = "testing" User-Password = "password" NAS-IP-Address = 127.0.0.1 NAS-Port = 0 rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=165, length=48 Mikrotik-Group = "admin" Reply-Message = "Welcome admin"
Configuració de clients d'accés. Fitxer /etc/freeradius/clients.conf
La configuració de l'accés dels dispositius Access Servers (aka Clients Radius) es realitza al fitxer:
/etc/freeradius/clients.conf
Configuració per defecte
Al fitxer /etc/freeradius/clients.conf de un servidor Radius versió 2.1.9:
$ dpkg -l freeradius ii freeradius 2.1.9+dfsg-1ubuntu1 a high-performance and highly configurable RADIUS server
Trobareu el següent fitxer (s'han eliminat els comentaris):
$ sudo cat /etc/freeradius/clients.conf
client localhost {
ipaddr = 127.0.0.1
secret = testing123
require_message_authenticator = no
nastype = other # localhost isn't usually a NAS...
}
És a dir que es proporciona un accés des de localhost per tal de poder fer proves. La paraula de pas per defecte és testing123.
Configuració de clients extres
Vegem un exemple. Suposeu que teniu un dispositiu NAS amb la IP 1.1.1.3. Si podeu
$ sudo joe /etc/freeradius/clients.conf client 1.1.1.3 { secret = ParaulaPdePas shortname = nomdeldispositiu }
On secret és la paraula de pas que utilitzarà el dispositiu per tal d'accedir al servidor radius.
Virtual Hosts
Des de la versió 2.0 de Radius el servidor suporta Virtual Hosts a l'estil del que fa també el servidor Apache. Teniu dos carpetes:
- /etc/freeradius/sites-available: Conté els llocs virtuals disponibles.
- /etc/freeradius/sites-available: Conté els llocs virtuals actius. Són links suaus (soft link) a els sites-available.
El virtual host per defecte és:
/etc/freeradius/sites-available/default
De fet per defecte els únics docs sites activats són default' i inner-tunnel:
$ sudo su # cd /etc/freeradius/sites-enable $ sudo ls -la total 8 drwxr-s--x 2 freerad freerad 4096 2011-12-07 16:23 . drwxr-s--x 6 freerad freerad 4096 2011-12-08 17:42 .. lrwxrwxrwx 1 root freerad 26 2011-12-07 16:23 default -> ../sites-available/default lrwxrwxrwx 1 root freerad 31 2011-12-07 16:23 inner-tunnel -> ../sites-available/inner-tunnel
De fet un virtual server es defineix per les seccions:
server {
...
}
Que es podrien posar totes al fitxer principal de configuració però que més val la pena ordenar i posar en fitxers separats a la carpeta sites-available.
Documentació
Consulteu el fitxer:
/etc/freeradius/sites-available/README
Com funciona l'autorització d'usuaris?
Es passa per les següents fases:
- preprocess
- suffix
- files
- Altres mòduls: per exemple ldap o mysql
TODO: Extret de /usr/share/doc/freeradius/ldap-howto.txt
The first thing that is done is authorization of the user. The radius server
will process the modules in the order specified in the authorization section of
radiusd.conf. Currently, they are in the following order.
The first module will be preprocess. This will first check the huntgroups of
the user coming in. The huntgroups are defined in the file huntgroups and they
are a group listing of the NAS-IP-Addresses that make the access_request. This
is useful in creating specific actions based on the NAS-IP that the request is
made from. An example, is below:
isdncombo NAS-IP-Address == 10.10.10.1
dialup NAS-IP-Address == 10.10.10.2
dialup NAS-IP-Address == 10.10.10.3
We will have one NAS that is used for both ISDN and regular dialup customers,
the other NAS's will be only used for dialup.
The preprocess module may also use the hints file, to load hints to the radius
server, and add additional hacks that are based on the type of request that
comes in. This is to help with certain NAS's that don't conform to radius
RFC's. Check the comments in radiusd.conf for an explanation on those.
The second module is suffix. This event will determine which realm the user is
in, based on the User-Name attribute. It is currently setup to split the
username at the occurence of the @symbol. For example, the username of
example@mydomain.com, will be split into example and mydomain.com. The realm
is then checked against the file proxy.conf, which will determine what actions
should be taken for that realm. Certain realms can be setup to be proxied to a
different radius server or set to authenticate locally. Also, the username can
be setup to be stripped from the realm or left intact. An example of
proxy.conf, is listed below. If the realm is to be proxied, then a secret is
needed, which is the secret of the radius server it is to be proxied to.
By default the User-Name will be stripped, unless the nostrip option is set.
Currently we will not be using realms with our users, but adding this ability
in the future will be much easier with already incorporating proxy.conf into the
setup.
proxy server {
synchronous = no
retry_delay = 5
retry_count = 3
dead_time = 120
servers_per_realm = 15
default_fallback = yes
}
realm NULL {
type = radius
authhost = LOCAL
accthost = LOCAL
#secret = testing123
}
realm DEFAULT {
type = radius
authhost = LOCAL
accthost = LOCAL
#secret = testing123
}
The next module is files, which is commonly know as the users file. The users
file will start with either a username to determine how to authorize a specific
user, or a DEFAULT setting. In each line it will define what items must be
present for there to be a match in the form of attribute == value. If all the
required attributes are matched, then attributes specified with attribute :=
value will be set for that user. If no match is found the users file will
continue to be processed until there is a match. The last DEFAULT setting will
be set as a catch-all, in case there is no previous match. If a match is made,
the statement of Fall-Through determines if the users file should continue to
be processed or if it should stop right there.
The Ldap-Group corresponds to the LDAP attribute of radiusGroupName (see ldap
configuration above). The user may be assigned multiple radiusGroupNames, one
for each of the services that the user is authorized for. If the user does
belong to the correct group, then the user will be authorized for that type of
access. If the user does not belong to that group, then there will not be a
match and the users file will continue to be processed. If a match is made and
there is a User-Profile set, then the radius server will lookup the attributes
that exist in that User-Profile in the LDAP directory. These are radius
attributes that will be sent to the NAS as a reply-item.
Mòduls
Els mòduls s'activen o desactiven al fitxer:
$ sudo joe /etc/freeradius/radiusd.conf
Concretament a la secció modules:
# MODULE CONFIGURATION
#
# The names and configuration of each module is located in this section.
#
# After the modules are defined here, they may be referred to by name,
# in other sections of this configuration file.
#
modules {
...
Els mòduls es troben instal·lats a la carpeta:
/usr/lib/freeradius
I solen començar per rlm_NOMMODUL.so
Mòduls de bases de dades d'autenticació
Abans que res cal aclarir certs temes relacionats amb els sistemes d'autenticació i la compatibilitat de paraules de pas.
Un sistema d'autenticació extern és un sistema que és utilitzat pel servidor Radius com un authentication oracle de forma que afecta al servidor Radius limitant el protocols d'autenticació que el servidor Radius podrà suportar.
Un authentication oracle és un sistema en el qual el servidor Radius no relitza ell mateix l'autenticació, sinó que la delega passant les credencials d'autenticació del client a un altre sistema. Aquestes credencials normalment són un nom d'usuari i una paraula de pas (p. ex. en el protocols d'autenticació PAP o MS-CHAP)
El oracle rep les credencials i retorna simplement un missatge de credencials correctes o errònies.
Des del punt de vista del servidor Radius, sistemes com PAM o LDAP ("bind as user") o ntlm_auth són oracles de la mateixa forma que des del punt de vista del client radius/NAS el servidor Radius també és un oracle.
La següent taula mostra les compatibilitats entre els sistemes més comuns d'autenticació i els protocols d'autenticació.
freeradius-ldap
IMPORTANT: Limitació important: Ldap només funcionarà quan la petició (Access-Request) contingui una paraula de pas sense xifrar (PAP) i no funcionarà amb cap altre mètode d'autenticació. Això també implica que les paraules de pas han d'estar guardades a l'arbre Ldap també en clar!
Per instal·lar el suport de freeradius per a Ldap cal instal·lar i activar el mòdul Ldap:
$ sudo apt-get install freeradius-ldap
Els fitxers instal·lats són:
$ dpkg -L freeradius-ldap /. /usr /usr/lib /usr/lib/freeradius /usr/lib/freeradius/rlm_ldap-2.1.9.so /usr/share /usr/share/doc /usr/share/doc/freeradius-ldap /usr/share/doc/freeradius-ldap/changelog.gz /usr/share/doc/freeradius-ldap/copyright /usr/share/doc/freeradius-ldap/changelog.Debian.gz /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/freeradius-ldap /usr/lib/freeradius/rlm_ldap.so
Com podeu veure poca cosa.
Els passos a seguir per conectar el servidor Radius a Ldap són els següents:
IMPORTANT: La majoria de documentació i howtos que trobareu per Internet fan referència a la versió 1. Els canvis més destacables són:
- No es modifica el fitxer /etc/raddb/radiusd.conf: Ara el fitxer és diu /etc/freeradius/radiusd.conf. A més cal tenir en compte que les seccions authorize i ara no es poden posar a aquest fitxer (o en tot cas s'han de posar dins d'una secció server) sinó en els virtual host. Es a dir cal modificar el fitxer /etc/freeradius/sites-available/default.
- També veureu que parlen sempre de fer-ho tot al fitxer /etc/raddb/radiusd.conf. En la versió 2.0 aquest fitxer no es toca gairebé mai i delega la feina als fitxer /etc/freeradius/sites-available/default i també al fitxer de configuració del mòdul Ldap /etc/freeradius/modules/ldap
Editeu el fitxer /etc/freeradius/sites-available/default i canvieu:
$ sudo joe /etc/freeradius/sites-available/default
- Dins de la secció authorize descomenteu la línia corresponent a Ldap (està després de sql)
- Dins de la secció authenticate descomenteu:
Auth-Type LDAP {
ldap
}
Que està després de la secció unix. Ara modifiqueu el fitxer
$ sudo joe /etc/freeradius/modules/ldap
Per tal d'indicar les dades de connexió que utilitzarà el servidor Radius per a connectar-se al servidor Ldap. Un exemple:
ldap {
# Define the LDAP server and the base domain name
server = "localhost"
basedn = "dc=example,dc=com"
# Define which attribute from an LDAP "ldapsearch" query
# is the password. Create a filter to extract the password
# from the "ldapsearch" output
password_attribute = "userPassword"
filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
# The following are RADIUS defaults
start_tls = no
dictionary_mapping = ${raddbdir}/ldap.attrmap
ldap_connections_number = 5
timeout = 4
timelimit = 3
net_timeout = 1
}
El paquet original del servidor radius (paquet freeradius) ja tenia alguns fitxers de la configuració Ldap:
$ dpkg -L freeradius | grep ldap /etc/freeradius/ldap.attrmap /etc/freeradius/modules/ldap /usr/share/doc/freeradius/ldap_howto.txt.gz /usr/share/doc/freeradius/examples/openldap.schema /usr/share/doc/freeradius/rlm_ldap.gz
És important tenir en compte el següent comentari del fitxer /etc/freeradius/modules/ldap:
# Lightweight Directory Access Protocol (LDAP) # # This module definition allows you to use LDAP for # authorization and authentication. # # See raddb/sites-available/default for reference to the # ldap module in the authorize and authenticate sections. # # However, LDAP can be used for authentication ONLY when the # Access-Request packet contains a clear-text User-Password # attribute. LDAP authentication will NOT work for any other # authentication method. # # This means that LDAP servers don't understand EAP. If you # force "Auth-Type = LDAP", and then send the server a # request containing EAP authentication, then authentication # WILL NOT WORK. # # The solution is to use the default configuration, which does # work. # # Setting "Auth-Type = LDAP" is ALMOST ALWAYS WRONG. We # really can't emphasize this enough.
En resum ens ve a dir que no es pot utilitzar EAP.
- http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch31_:_Centralized_Logins_Using_LDAP_and_RADIUS#Configuring_RADIUS_for_LDAP
- http://www.alcancelibre.org/staticpages/index.php/como-freeradius-basico. Documentació obsoleta per a la versió 1.0.
- http://vuksan.com/linux/dot1x/802-1x-LDAP.html
- http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch31_:_Centralized_Logins_Using_LDAP_and_RADIUS#Configuring_RADIUS_for_LDAP
Depurar una connexió Ldap
$ sudo freeradius -X
...
rad_recv: Access-Request packet from host 192.168.111.97 port 46958, id=30, length=104
Service-Type = Login-User
User-Name = "sergitur"
CHAP-Challenge = 0x5ab189cf3abaadad364153a6dac6d6f1
CHAP-Password = 0x003cc8cc50940383290e45b6894f6f9a45
Calling-Station-Id = "192.168.111.2"
NAS-Identifier = "MikroTik"
NAS-IP-Address = 192.168.111.97
+- entering group authorize {...}
++[preprocess] returns ok
[auth_log] expand: /var/log/freeradius/radacct/%{Client-IP-Address}/auth-detail-%Y%m%d -> /var/log/freeradius/radacct/192.168.111.97/auth-detail- 20111208
[auth_log] /var/log/freeradius/radacct/%{Client-IP-Address}/auth-detail-%Y%m%d expands to /var/log/freeradius/radacct/192.168.111.97/auth-detail- 20111208
[auth_log] expand: %t -> Thu Dec 8 19:48:43 2011
++[auth_log] returns ok
[chap] Setting 'Auth-Type := CHAP'
++[chap] returns ok
++[mschap] returns noop
[suffix] No '@' in User-Name = "sergitur", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
++[files] returns noop
[ldap] performing user authorization for sergitur
[ldap] expand: %{Stripped-User-Name} ->
[ldap] ... expanding second conditional
[ldap] expand: %{User-Name} -> sergitur
[ldap] expand: (uid=%{%{Stripped-User-Name}:-%{User-Name}}) -> (uid=sergitur)
[ldap] expand: ou=maninfo,ou=Personal,ou=All,dc=iesebre,dc=com -> ou=maninfo,ou=Personal,ou=All,dc=iesebre,dc=com
[ldap] ldap_get_conn: Checking Id: 0
[ldap] ldap_get_conn: Got Id: 0
[ldap] attempting LDAP reconnection
[ldap] (re)connect to 192.168.0.8:389, authentication 0
[ldap] bind as / to 192.168.0.8:389
[ldap] waiting for bind result ...
[ldap] Bind was successful
[ldap] performing search in ou=maninfo,ou=Personal,ou=All,dc=iesebre,dc=com, with filter (uid=sergitur)
[ldap] No default NMAS login sequence
[ldap] looking for check items in directory...
[ldap] looking for reply items in directory...
WARNING: No "known good" password was found in LDAP. Are you sure that the user is configured correctly?
[ldap] user sergitur authorized to use remote access
[ldap] ldap_release_conn: Release Id: 0
++[ldap] returns ok
++[expiration] returns noop
++[logintime] returns noop
[pap] WARNING! No "known good" password found for the user. Authentication may fail because of this.
++[pap] returns noop
Found Auth-Type = CHAP
+- entering group CHAP {...}
[chap] login attempt by "sergitur" with CHAP password
[chap] Cleartext-Password is required for authentication
++[chap] returns invalid
Failed to authenticate the user.
Login incorrect (rlm_chap: Clear text password not available): [sergitur] (from client rb1200 port 0 cli 192.168.111.2)
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject] expand: %{User-Name} -> sergitur
attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 0 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
rad_recv: Access-Request packet from host 192.168.111.97 port 46958, id=30, length=104
Waiting to send Access-Reject to client rb1200 port 46958 - ID: 30
Waking up in 0.6 seconds.
rad_recv: Access-Request packet from host 192.168.111.97 port 46958, id=30, length=104
Waiting to send Access-Reject to client rb1200 port 46958 - ID: 30
Waking up in 0.3 seconds.
Sending delayed reject for request 0
Sending Access-Reject of id 30 to 192.168.111.97 port 46958
CHAP i Ldap
IMPORTANT: Sembla ser que l'única forma de fer funcionar Freeradius amb Ldap i peticions CHAP és guardar les paraules de pas en clar al servidor Ldap
http://freeradius.1045715.n5.nabble.com/Chap-auhtentication-against-LDAP-td2781170.html http://lists.cistron.nl/pipermail/freeradius-users/2010-March/msg00197.html
TODO: http://lists.cistron.nl/pipermail/freeradius-users/2010-March/msg00197.html
It only attempts to bind as the user if you're using LDAP for *authentication* (as opposed to authorization). You correctly point out that you can't do chap that way (so don't). If your users are in an LDAP directory what you need to do is to get the *authorization* phase of FreeRADIUS to lookup the cleartext password (or NT hash if you're using ntlm/samba) from the directory. The authorization part of rlm_ldap will then add the password or hash to the request. Then let the chap module perform the authentication using the password that was looked up during authorization. To perform the LDAP lookup rlm_ldap has to be able to bind to the server, this is done using the login and password instance attribute set in the ldap configuration file (/etc/raddb/modules/ldap). You'll also need to make sure you define the search filter etc. for performing the password lookup. Don't forget to set ACL's on the cleartext password in LDAP to prevent unauthorized retrevial of any user's password. You'll also need to the the userPassword attribute mapping in the /etc/raddb/ldap.attrmap file like this:
checkItem Cleartext-Password userPassword
With debug enabled if you get this message:
WARNING: No "known good" password was found in LDAP. Are you sure that the user is configured correctly?
Then the retrieval of the cleartext password failed during *authorization* and the subsequent chap *authentication* will fail because it does not have a clear text password to utilize during the chap exchange.
--
John Dennis <jdennis@redhat.com>
Looking to carve out IT costs? www.redhat.com/carveoutcosts/
freeradius-mysql
$ sudo apt-get install freeradius-mysql S'està llegint la llista de paquets... Fet S'està construint l'arbre de dependències S'està llegint la informació de l'estat... Fet S'instal·laran els paquets NOUS següents: freeradius-mysql 0 actualitzats, 1 nous a instal·lar, 0 a suprimir i 6 no actualitzats. Es necessita obtenir 39,3kB d'arxius. Després d'aquesta operació s'empraran 176kB d'espai en disc addicional. Bai:1 http://es.archive.ubuntu.com/ubuntu/ maverick/universe freeradius-mysql amd64 2.1.9+dfsg-1ubuntu1 [39,3kB] 39,3kB baixats en 0s (165kB/s) S'està seleccionant el paquet freeradius-mysql prèviament no seleccionat. (S'està llegint la base de dades … hi ha 333283 fitxers i directoris instal·lats actualment.) S'està desempaquetant freeradius-mysql (de …/freeradius-mysql_2.1.9+dfsg-1ubuntu1_amd64.deb) … S'està configurant freeradius-mysql (2.1.9+dfsg-1ubuntu1) … * Stopping FreeRADIUS daemon freeradius * /var/run/freeradius /freeradius.pid not found... [ OK ] * Starting FreeRADIUS daemon freeradius [ OK ]
$ dpkg -L freeradius-mysql /. /usr /usr/lib /usr/lib/freeradius /usr/lib/freeradius/rlm_sql_mysql-2.1.9.so /usr/share /usr/share/doc /usr/share/doc/freeradius-mysql /usr/share/doc/freeradius-mysql/changelog.gz /usr/share/doc/freeradius-mysql/copyright /usr/share/doc/freeradius-mysql/changelog.Debian.gz /etc /etc/freeradius /etc/freeradius/sql /etc/freeradius/sql/mysql /etc/freeradius/sql/mysql/admin.sql /etc/freeradius/sql/mysql/counter.conf /etc/freeradius/sql/mysql/cui.conf /etc/freeradius/sql/mysql/cui.sql /etc/freeradius/sql/mysql/dialup.conf /etc/freeradius/sql/mysql/ippool.conf /etc/freeradius/sql/mysql/ippool.sql /etc/freeradius/sql/mysql/nas.sql /etc/freeradius/sql/mysql/schema.sql /etc/freeradius/sql/mysql/wimax.conf /etc/freeradius/sql/mysql/wimax.sql /usr/lib/freeradius/rlm_sql_mysql.so
libpam-radius-auth
ntlm_auth i Samba PDC
I have CHAP (PEAP) authentication working against my Samba PDC via ntlm_auth.
Fitxers de log
/var/log/freeradius/radius.log
En la configuració per defecte és el fitxer principal de log
$ sudo tail -f /var/log/freeradius/radius.log
NOTA: Si la instal·lació és compilada/manual el més possible és: /usr/local/var/log/radius
Per tal que apareguin les peticions de login dels clients cal activar la variable auth de la secció log del fitxer /etc/freeradius/freeradius.conf:
log {
destination = files
file = ${logdir}/radius.log
syslog_facility = daemon
stripped_names = no
auth = yes
auth_badpass = no
auth_goodpass = no
# msg_goodpass = ""
# msg_badpass = ""
}
$ sudo tail -f /var/log/freeradius/radius.log Thu Dec 8 16:25:21 2011 : Auth: Login incorrect (rlm_pap: CLEAR TEXT password check failed): [testing] (from client local port 10) ... Thu Dec 8 16:33:07 2011 : Auth: Login OK: [testing] (from client localhost port 10)
Diccionaris
/etc/freeradius/dictionary
El fitxer principal de configuració dels diccionaris és:
$ cat /etc/freeradius/dictionary # # This is the master dictionary file, which references the # pre-defined dictionary files included with the server. # # Any new/changed attributes MUST be placed in this file, as # the pre-defined dictionaries SHOULD NOT be edited. # # $Id$ # # # The filename given here should be an absolute path. # $INCLUDE /usr/share/freeradius/dictionary # # Place additional attributes or $INCLUDEs here. They will # over-ride the definitions in the pre-defined dictionaries. # # See the 'man' page for 'dictionary' for information on # the format of the dictionary files. # # If you want to add entries to the dictionary file, # which are NOT going to be placed in a RADIUS packet, # add them here. The numbers you pick should be between # 3000 and 4000. # #ATTRIBUTE My-Local-String 3000 string #ATTRIBUTE My-Local-IPAddr 3001 ipaddr #ATTRIBUTE My-Local-Integer 3002 integer
TODO:
- This file contains dictionary translations for parsing
- requests and generating responses. All transactions are
- composed of Attribute/Value Pairs. The value of each attribute
- is specified as one of 4 data types. Valid data types are:
- text - printable, generally UTF-8 encoded (subset of 'string')
- string - 0-253 octets
- ipaddr - 4 octets in network byte order
- integer - 32 bit value in big endian order (high byte first)
- date - 32 bit value in big endian order - seconds since
- 00:00:00 GMT, Jan. 1, 1970
- ifid - 8 octets in network byte order
- ipv6addr - 16 octets in network byte order
- ipv6prefix - 18 octets in network byte order
- ether - 6 octets of hh:hh:hh:hh:hh:hh
- where 'h' is hex digits, upper or lowercase.
- FreeRADIUS includes extended data types which are not defined
- in the RFC's. These data types are:
- abinary - Ascend's binary filter format.
- octets - raw octets, printed and input as hex strings.
- e.g.: 0x123456789abcdef
- Enumerated values are stored in the user file with dictionary
- VALUE translations for easy administration.
- Example:
- ATTRIBUTE VALUE
- --------------- -----
- Framed-Protocol = PPP
- 7 = 1 (integer encoding)
$ cat /usr/share/freeradius/dictionary.mikrotik # -*- text -*- # http://www.mikrotik.com # # http://www.mikrotik.com/documentation//manual_2.9/dictionary # # Do NOT follow their instructions and replace the dictionary # in /etc/raddb with the one that they supply. It is NOT necessary. # # On top of that, the sample dictionary file they provide # DOES NOT WORK. Do NOT use it. # # $Id$ # VENDOR Mikrotik 14988 BEGIN-VENDOR Mikrotik ATTRIBUTE Mikrotik-Recv-Limit 1 integer ATTRIBUTE Mikrotik-Xmit-Limit 2 integer # this attribute is unused ATTRIBUTE Mikrotik-Group 3 string ATTRIBUTE Mikrotik-Wireless-Forward 4 integer ATTRIBUTE Mikrotik-Wireless-Skip-Dot1x 5 integer ATTRIBUTE Mikrotik-Wireless-Enc-Algo 6 integer ATTRIBUTE Mikrotik-Wireless-Enc-Key 7 string ATTRIBUTE Mikrotik-Rate-Limit 8 string ATTRIBUTE Mikrotik-Realm 9 string ATTRIBUTE Mikrotik-Host-IP 10 ipaddr ATTRIBUTE Mikrotik-Mark-Id 11 string ATTRIBUTE Mikrotik-Advertise-URL 12 string ATTRIBUTE Mikrotik-Advertise-Interval 13 integer ATTRIBUTE Mikrotik-Recv-Limit-Gigawords 14 integer ATTRIBUTE Mikrotik-Xmit-Limit-Gigawords 15 integer # MikroTik Values VALUE Mikrotik-Wireless-Enc-Algo No-encryption 0 VALUE Mikrotik-Wireless-Enc-Algo 40-bit-WEP 1 VALUE Mikrotik-Wireless-Enc-Algo 104-bit-WEP 2 END-VENDOR Mikrotik
NOTA: HI ha un diccionari força diferent ??? a: http://www.mikrotik.com/documentation//manual_2.9/dictionary
Aplicacions relacionadas
Interfícies gràfiques
Dialup admin
Es tracta d'una aplicació web tipus LAMP i proporcionada pel propi paquet freeradius. Per tant heu de tenir abans instal·lat LAMP:
$ sudo apt-get install tasksel $ sudo tasksel install lamp-server
Per instal·lar-lo:
$ sudo apt-get install freeradius-dialupadmin
Un cop instal·lat cal activar el lloc web d'Apache amb:
$ sudo cp /etc/freeradius-dialupadmin/apache2.conf /etc/apache2/conf.d/ $ sudo /etc/init.d/apache2 restart
Ara podeu accedir a l'aplicació web amb:
http://localhost/freeradius-dialupadmin/
Però veureu que no està configurada i aleshores falla. A la carpeta:
$ cd /usr/share/freeradius-dialupadmin/sql/mysql
Trobareu els scripts SQL necessaris per a crear la base de dades. Cal fer:
$ sudo mysql -p mysql> CREATE DATABASE radius; Query OK, 1 row affected (0.00 sec) mysql> exit
I crear les taules:
$ sudo mysql -p radius < badusers.sql $ sudo mysql -p radius < badusers.sql $ sudo mysql -p radius < mtotacct.sql $ sudo mysql -p radius < totacct.sql
Només si voleu guardar els usuaris a MySQL cal que feu:
$ sudo mysql -p radius < userinfo.sql
NOTA: Els usuaris es poden guardar també a Ldap
Ara cal modificar la configuració. Els fitxers de configuració es troben a:
/etc/freeradius-dialupadmin
El fitxer principal de configuració és:
$ sudo joe /etc/freeradius-dialupadmin/admin.conf
Configurem MySQL modificant la secció:
# # can be one of mysql,pg,oracle,sqlrelay where: # mysq: MySQL database (port 3306) # pg: PostgreSQL database (port 5432) # oracle: Oracle database (port 1521) # sqlrelay: SQL Relay # sql_type: mysql sql_server: localhost sql_port: 3306 sql_username: dialup_admin sql_password: XXXXXX sql_database: radius sql_accounting_table: radacct sql_badusers_table: badusers sql_check_table: radcheck sql_reply_table: radreply sql_user_info_table: userinfo sql_groupcheck_table: radgroupcheck sql_groupreply_table: radgroupreply sql_usergroup_table: usergroup sql_total_accounting_table: totacct sql_nas_table: nas
Cal crear un usuari i paraula de pas d'accés. Aquest tipus d'usuari no és utilitzat per una persona humana, per tant, el millor es generar un password aleatori, podeu utilitzar mkpasswd:
$ mkpasswd Contrasenya: ERFIZ3XtuOADg
Ara creem l'usuari mysql:
$ sudo mysql -p mysql> USE radius; Database changed mysql> grant create, select, insert, update, delete, alter, lock tables on radius.* to 'dialup_admin'@'localhost' identified by 'EPDIZ3XtuOADg'; Query OK, 0 rows affected (0.06 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> exit
Ara segurament us interessarà desactivar el debug de mysql (si no es mostra la paraula de pas per la web!). Comenteu la línia:
# # Uncomment to enable sql debug # sql_debug: true
ARA ASN Radius Admin
Utilitats
Accounting log parser
User configuration scripts
RadiusReport
A radius log analysis program written in Perl.
Scripts to generate usage graphs.
FreeIPA
http://freeipa.org/page/Main_Page
Altres clients
RouterOS i Radius
Vegeu també RouterOS i RouterOS i Radius
Paquets
$ sudo apt-cache search radius freeradius - a high-performance and highly configurable RADIUS server freeradius-common - FreeRADIUS common files freeradius-dbg - debug symbols for the FreeRADIUS packages freeradius-utils - FreeRADIUS client utilities libfreeradius-dev - FreeRADIUS shared library development files libfreeradius2 - FreeRADIUS shared library libpam-radius-auth - The PAM RADIUS authentication module libradius1 - /bin/login replacement with RADIUS. Shared lib to used by programs libradius1-dev - /bin/login replacement with RADIUS. Header file and link lib chillispot - Wireless LAN Access Point Controller freeradius-dialupadmin - set of PHP scripts for administering a FreeRADIUS server freeradius-iodbc - iODBC module for FreeRADIUS server freeradius-krb5 - kerberos module for FreeRADIUS server freeradius-ldap - LDAP module for FreeRADIUS server freeradius-mysql - MySQL module for FreeRADIUS server [[freeradius-postgresql - PostgreSQL module for FreeRADIUS server hostapd - user space IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator libapache2-mod-auth-radius - Apache 2.x module for RADIUS authentication libauthen-radius-perl - module to authenticate users using RADIUS libauthen-simple-radius-perl - Simple RADIUS authentication libcrypt-hcesha-perl - Perl extension for one way hash chaining encryption using SHA libmpfi-dev - multiple precision floating-point interval computation library libmpfi0 - multiple precision floating-point interval computation library libradiusclient-ng-dev - Enhanced RADIUS client library development files libradiusclient-ng2 - Enhanced RADIUS client library netams - network traffic accounting and monitoring daemon netams-dbg - debug symbols for NeTAMS netams-web - web interface for NeTAMS php-auth - PHP PEAR modules for creating an authentication system php-radius-legacy - Radius protocol implementation in PHP php5-radius - PECL radius module for PHP 5 portslave - Terminal server that does PPP and authenticates via RADIUS python-pyrad - Python module for creating and decoding RADIUS packets python-smbpasswd - This module can generate both LANMAN and NT password hashes radiusclient1 - /bin/login replacement which uses the RADIUS protocol for authentication radiusd-livingston - Remote Authentication Dial-In User Service (RADIUS) server radsecproxy - RADIUS protocol proxy supporting RadSec ser-acc-radius-module - accounting module for SER, with RADIUS support (dummy package) ser-radius-modules - RADIUS modules for the SIP Express Router xtradius - Free radius server implementation yardradius - YARD Radius Authorization and Accounting Server mythmovies - Find nearby movies and cinema listings
Documentació
FAQ
Radius versus Ldap
TODO
Most of you have already heard of RADIUS and many of you use it in your infrastructure (usually to provide wi-fi or dialup/dsl access). Have you ever wondered, what’s the main difference between RADIUS and user authentication databases like LDAP (and also what they have in common)? Here ‘re a few points:
* LDAP and RADIUS have something in common. They ‘re both mainly a protocol (more than a database) which uses attributes to carry information back and forth. They ‘re clearly defined in RFC documents so you can expect products from different vendors to be able to function properly together. * RADIUS is NOT a database. It’s a protocol for asking intelligent questions to a user database. LDAP is just a database. In recent offerings it contains a bit of intelligence (like Roles, Class of Service and so on) but it still is mainly just a rather stupid database. RADIUS (actually RADIUS servers like FreeRADIUS) provide the administrator the tools to not only perform user authentication but also to authorize users based on extremely complex checks and logic. For instance you can allow access on a specific NAS only if the user belongs to a certain category, is a member of a specific group and an outside script allows access. There’s no way to perform any type of such complex decisions in a user database. * RADIUS also includes accounting. That means that you can use accounting history when making authorization decisions and get functionality like quotas (a user is only allowed 4 hours of dialup access per day regardless of how many times he connects). * With the introduction of Extensible Authentication Protocol (EAP) you can use almost any authentication protocol known to man :) * RADIUS is extensible. You can easily extend the RADIUS schema with attributes of you choice (as long as you have a Vendor number). RADIUS servers are extensible. You can use almost any database for authentication and accounting (LDAP, SQL, password files, outside scripts). The same stands for the LDAP protocol (one of the major factors for it’s popularity) and for LDAP servers although they don’t get even close to the levels allowed by RADIUS servers.
Vegeu també
-
- Diameter Protocol
- Radius Manager


