This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docpublic:reseaux:services:radius [2011/03/09 16:07] PROCACCIA created |
docpublic:reseaux:services:radius [2011/03/10 08:49] (current) PROCACCIA |
||
---|---|---|---|
Line 22: | Line 22: | ||
* Called-Station-Id adresse MAC du NAS | * Called-Station-Id adresse MAC du NAS | ||
* Calling-Station-Id adresse MAC du poste client terminal | * Calling-Station-Id adresse MAC du poste client terminal | ||
+ | * EAP-Message (n°79) transport dans radius des échanges EAP | ||
==== Protocoles Radius ==== | ==== Protocoles Radius ==== | ||
Line 63: | Line 64: | ||
* EAP/TLS (Transport Layer Security, successeur de SSL) authentification par cetificats electronique mutuels (client et serveur) | * EAP/TLS (Transport Layer Security, successeur de SSL) authentification par cetificats electronique mutuels (client et serveur) | ||
- | * EAP/PEAP (Protected EAP)=> echange de mot de passe protégés dans un tunnel chiffré | + | * EAP/PEAP (Protected EAP)=> echange de mot de passe protégés dans un tunnel chiffré, mot de passe type microsoft/ |
- | * EAP/TTLS (Tunneled TLS) => echange de mot de passe protégés dans un tunnel chiffré | + | * EAP/TTLS (Tunneled TLS) => echange de mot de passe protégés dans un tunnel chiffré, mot de passe type pap ou chap, compatible avec une base d'auth unix. |
+ | ==== protocole EAP ==== | ||
+ | |||
+ | === 3 couches === | ||
+ | |||
+ | - EAP, couche basse juste au dessus des trames 802 (niveau 2) , transmet les paquets de type //Request, Success, Failure//. | ||
+ | - EAP Peer et Authneticator, | ||
+ | - EAP Method, couche " | ||
+ | |||
+ | === 4 étapes === | ||
+ | |||
+ | - Identité Externe, entre le NAS et le supplicant (terminal client), le NAS envoie un EAP-Request/ | ||
+ | - Négociation du protocole, à la réception de l'// | ||
+ | - Protocole Transporté, | ||
+ | - Gestion des clés de chiffrement, | ||
+ | |||
+ | === EAP/PEAP === | ||
+ | |||
+ | authentification mutuelle entre le client et le serveur, mais asymetrique, | ||
+ | |||
+ | === EAP/TTLS === | ||
+ | |||
+ | meme principe, authentification mutuelle et asymetrique (afin d' | ||
+ | |||
+ | ===== sécurité Wifi ===== | ||
+ | |||
+ | Le securisation de la liaison radio entre le client terminal et le NAS est primordiale. Les faiblesses de WEP (Wired Equivalent Privacy) ne sont plus a démontrer. WPA (Wifi Protected Access) en attendant la norme 802.11i puis WPA2 quand la norme est sortie en 2004, ont nettement ameliorés la securité du lien radio . Un changement périodique des clés de chiffrement a lieu, TKIP (Temporal Key Integrity Protocol) pour WPA, mais basé sur l'algo de chiffrement RC4, WPA2 est basé sur un meilleur algo; AES. | ||
===== Freeradius 2.X ===== | ===== Freeradius 2.X ===== | ||
+ | |||
+ | ==== Principes ==== | ||
+ | |||
+ | deux étapes, autorisation puis authentification ! curieux de prime abord mais cela fonctionne comme ça . | ||
+ | Freeradius prepare le terrain en établissant la liste des autorisations qui sera envoyée au NAS quand l' | ||
+ | |||
+ | === base d' | ||
+ | |||
+ | Pour ce faire radius s' | ||
+ | |||
+ | - check-items, | ||
+ | - reply-items, | ||
+ | - config-items, | ||
+ | |||
+ | === base d' | ||
+ | |||
+ | simplement pour verifier le mot de passe de l' | ||
==== installation a base de RPM ==== | ==== installation a base de RPM ==== | ||
Line 364: | Line 408: | ||
inet adr: | inet adr: | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== FreeRadius EAP ===== | ||
+ | |||
+ | cinematique pour EAP, qui est la methode par defaut , à partir des fichiers de configuration | ||
+ | |||
+ | === clients.conf === | ||
+ | |||
+ | contient la liste des NAS avec leur credential , donc la liste des " | ||
+ | |||
+ | |||
+ | === users === | ||
+ | |||
+ | < | ||
+ | [root@radius raddb]# vim users | ||
+ | |||
+ | sallestp Auth-Type:= EAP | ||
+ | Reply-Message = "t es bien une bonne machine", | ||
+ | Tunnel-Type := VLAN, | ||
+ | Tunnel-Medium-Type := IEEE-802, | ||
+ | Tunnel-Private-Group-Id = 15, | ||
+ | Fall-Through = No | ||
+ | |||
+ | |||
+ | # default et check que NAS == Chillispot (patan), alors authZ de type ldap-chilli a suivre dans sites-enabled/ | ||
+ | DEFAULT NAS-Identifier == " | ||
+ | |||
+ | #On finis toujours ici, car " | ||
+ | # | ||
+ | # ne viens l' | ||
+ | DEFAULT | ||
+ | Tunnel-Type: | ||
+ | Tunnel-Medium-Type: | ||
+ | Tunnel-Private-Group-ID = 955, | ||
+ | Fall-Through = no | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Fichier principale ==== | ||
+ | |||
+ | sites-enabled/ | ||
+ | |||
+ | < | ||
+ | [root@radius raddb]# vim sites-enabled/ | ||
+ | |||
+ | # Authorization. First preprocess (hints and huntgroups files), | ||
+ | # then realms, and finally look in the " | ||
+ | # | ||
+ | # The order of the realm modules will determine the order that | ||
+ | # we try to find a matching realm. | ||
+ | |||
+ | authorize { | ||
+ | ... | ||
+ | # As of 2.0, the EAP module returns " | ||
+ | # for TTLS and PEAP. In 1.x, it never returned " | ||
+ | # this change is compatible with older configurations. | ||
+ | # The example below uses module failover to avoid querying all | ||
+ | # of the following modules if the EAP module returns " | ||
+ | # Therefore, your LDAP and/or SQL servers will not be queried | ||
+ | # for the many packets that go back and forth to set up TTLS | ||
+ | # or PEAP. The load on those servers will therefore be reduced. | ||
+ | # | ||
+ | eap { | ||
+ | ok = return | ||
+ | } | ||
+ | |||
+ | |||
+ | # Read the ' | ||
+ | # autz-type ldap-cilli = definition appeler dans files, donc definie avant ! | ||
+ | # files users : DEFAULT NAS-Identifier == " | ||
+ | |||
+ | Autz-Type ldap-chilli { | ||
+ | redundant-load-balance { | ||
+ | ldap1 | ||
+ | ldap2 | ||
+ | ldap3 | ||
+ | ldap4 | ||
+ | } | ||
+ | |||
+ | chilli | ||
+ | pap | ||
+ | } | ||
+ | files | ||
+ | expiration | ||
+ | logintime | ||
+ | .... | ||
+ | |||
+ | authenticate { | ||
+ | # PAP authentication, | ||
+ | # in the ' | ||
+ | # password can be clear-text, or encrypted. | ||
+ | Auth-Type PAP { | ||
+ | pap | ||
+ | } | ||
+ | ... | ||
+ | # | ||
+ | # MSCHAP authentication. | ||
+ | Auth-Type MS-CHAP { | ||
+ | mschap | ||
+ | } | ||
+ | ... | ||
+ | # Note that this means "check plain-text password against | ||
+ | # the ldap database", | ||
+ | # as it does not supply a plain-text password. | ||
+ | # valable pour le chilli | ||
+ | Auth-Type LDAP { | ||
+ | group { | ||
+ | redundant-load-balance { | ||
+ | ldap1 | ||
+ | ldap2 | ||
+ | ldap3 | ||
+ | ldap4 | ||
+ | } | ||
+ | ok=return | ||
+ | } | ||
+ | chilli | ||
+ | } | ||
+ | |||
+ | # | ||
+ | # Allow EAP authentication. | ||
+ | eap | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== eap.conf ==== | ||
+ | |||
+ | < | ||
+ | [root@radius raddb]# vim eap.conf | ||
+ | |||
+ | eap { | ||
+ | # Invoke the default supported EAP type when | ||
+ | # EAP-Identity response is received. | ||
+ | ... | ||
+ | # If the EAP-Type attribute is set by another module, | ||
+ | # then that EAP type takes precedence over the | ||
+ | # default type configured here. | ||
+ | # | ||
+ | default_eap_type = peap | ||
+ | .. | ||
+ | ## EAP-TLS | ||
+ | |||
+ | # Note that you should NOT use a globally known CA here! | ||
+ | # e.g. using a Verisign cert as a "known CA" means that | ||
+ | # ANYONE who has a certificate signed by them can | ||
+ | # authenticate via EAP-TLS! | ||
+ | tls { | ||
+ | # | ||
+ | # These is used to simplify later configurations. | ||
+ | # | ||
+ | certdir = ${confdir}/ | ||
+ | cadir = ${confdir}/ | ||
+ | |||
+ | private_key_password = radius | ||
+ | private_key_file = ${certdir}/ | ||
+ | | ||
+ | # | ||
+ | # certificate_file below MUST include not | ||
+ | # only the server certificate, | ||
+ | # of the CA certificates used to sign the | ||
+ | # server certificate. | ||
+ | # | ||
+ | certificate_file = ${certdir}/ | ||
+ | # | ||
+ | |||
+ | # This parameter is used only for EAP-TLS, | ||
+ | # when you issue client certificates. | ||
+ | # not use client certificates, | ||
+ | # to permit EAP-TLS authentication, | ||
+ | # this configuration item. | ||
+ | CA_file = ${cadir}/ | ||
+ | | ||
+ | | ||
+ | # If check_cert_cn is set, the value will | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | check_cert_cn = %{User-Name} | ||
+ | |||
+ | |||
+ | |||
+ | ttls { | ||
+ | # The tunneled EAP session needs a default | ||
+ | # EAP type which is separate from the one for | ||
+ | # the non-tunneled EAP module. | ||
+ | # TTLS tunnel, we recommend using EAP-MD5. | ||
+ | default_eap_type = md5 | ||
+ | # The tunneled authentication request does | ||
+ | # not usually contain useful attributes | ||
+ | # like ' | ||
+ | # attributes are outside of the tunnel, | ||
+ | # and normally unavailable to the tunneled | ||
+ | # authentication request. | ||
+ | # | ||
+ | # By setting this configuration entry to | ||
+ | # ' | ||
+ | # tunneled authentication request, but | ||
+ | # which IS available outside of the tunnel, | ||
+ | # is copied to the tunneled request. | ||
+ | # | ||
+ | # allowed values: {no, yes} | ||
+ | copy_request_to_tunnel = yes | ||
+ | | ||
+ | | ||
+ | # The reply attributes sent to the NAS are | ||
+ | # usually based on the name of the user | ||
+ | # ' | ||
+ | # ' | ||
+ | # reply attributes based on the user name | ||
+ | # inside of the tunnel, then set this | ||
+ | # configuration entry to ' | ||
+ | # to the NAS will be taken from the reply to | ||
+ | # the tunneled request. | ||
+ | # | ||
+ | # allowed values: {no, yes} | ||
+ | use_tunneled_reply = yes | ||
+ | |||
+ | The inner tunneled request can be sent | ||
+ | # through a virtual server constructed | ||
+ | # specifically for this purpose. | ||
+ | # | ||
+ | # If this entry is commented out, the inner | ||
+ | # tunneled request will be sent through | ||
+ | # the virtual server that processed the | ||
+ | # outer requests. | ||
+ | # | ||
+ | virtual_server = " | ||
+ | | ||
+ | | ||
+ | # The PEAP module needs the TLS module to be installed | ||
+ | # and configured, in order to use the TLS tunnel | ||
+ | # inside of the EAP packet. | ||
+ | # configure the TLS module, even if you do not want | ||
+ | # to deploy EAP-TLS in your network. | ||
+ | # be able to request EAP-TLS, as it requires them to | ||
+ | # have a client certificate. | ||
+ | # 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. | ||
+ | # PEAP tunnel, we recommend using MS-CHAPv2, | ||
+ | # as that is the default type supported by | ||
+ | # Windows clients. | ||
+ | default_eap_type = mschapv2 | ||
+ | |||
+ | # the PEAP module also has these configuration | ||
+ | # items, which are the same as for TTLS. | ||
+ | copy_request_to_tunnel = yes | ||
+ | use_tunneled_reply = yes | ||
+ | |||
+ | # The inner tunneled request can be sent | ||
+ | # through a virtual server constructed | ||
+ | # specifically for this purpose. | ||
+ | # | ||
+ | # If this entry is commented out, the inner | ||
+ | # tunneled request will be sent through | ||
+ | # the virtual server that processed the | ||
+ | # outer requests. | ||
+ | # | ||
+ | virtual_server = " | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== inner-tunnel ==== | ||
+ | |||
+ | < | ||
+ | [root@radius raddb]# vim sites-enabled/ | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
===== références ===== | ===== références ===== |