FreeRADIUS: Diferència entre les revisions

De Guifi.net - Wiki Català

Línia 19: Línia 19:
 
* Editem els arxius de configuració
 
* Editem els arxius de configuració
 
:'''/etc/freeradius/radiusd.conf'''
 
:'''/etc/freeradius/radiusd.conf'''
 +
<table
 +
style="text-align: left; height: 32px; font-family: monospace; background-color: rgb(232, 232, 232); width: 507px;"
 +
border="1" cellpadding="0" cellspacing="0">
 +
<small> </small><tbody width="424">
 +
<tr width="424">
 +
<small> </small><td
 +
style="vertical-align: top; width: 422px; background-color: rgb(204, 204, 204);"><small>prefix
 +
= /usr<br>
 +
exec_prefix = /usr<br>
 +
sysconfdir = /etc<br>
 +
localstatedir = /var<br>
 +
sbindir = ${exec_prefix}/sbin<br>
 +
logdir = /var/log/freeradius<br>
 +
raddbdir = /etc/freeradius<br>
 +
radacctdir = ${logdir}/radacct<br>
 +
&nbsp;<br>
 +
name = freeradius<br>
 +
&nbsp;<br>
 +
confdir = ${raddbdir}<br>
 +
run_dir = ${localstatedir}/run/${name}<br>
 +
&nbsp;<br>
 +
db_dir = ${raddbdir}<br>
 +
&nbsp;<br>
 +
libdir = /usr/lib/freeradius<br>
 +
pidfile = ${run_dir}/${name}.pid<br>
 +
&nbsp;<br>
 +
user = freerad<br>
 +
group = freerad<br>
 +
&nbsp;<br>
 +
max_request_time = 30<br>
 +
cleanup_delay = 5<br>
 +
max_requests = 1024<br>
 +
&nbsp;<br>
 +
listen {<br>
 +
type = auth<br>
 +
ipaddr = *<br>
 +
port = 0<br>
 +
}<br>
 +
&nbsp;<br>
 +
listen {<br>
 +
ipaddr = *<br>
 +
port = 0<br>
 +
type = acct<br>
 +
}<br>
 +
&nbsp;<br>
 +
hostname_lookups = no<br>
 +
allow_core_dumps = no<br>
 +
&nbsp;<br>
 +
regular_expressions&nbsp;&nbsp;&nbsp; = yes<br>
 +
extended_expressions&nbsp;&nbsp;&nbsp; = yes<br>
 +
&nbsp;<br>
 +
log {<br>
 +
destination = files<br>
 +
file = ${logdir}/radius.log<br>
 +
syslog_facility = daemon<br>
 +
stripped_names = no<br>
 +
auth = no<br>
 +
auth_badpass = no<br>
 +
auth_goodpass = no<br>
 +
}<br>
 +
&nbsp;<br>
 +
checkrad = ${sbindir}/checkrad<br>
 +
&nbsp;<br>
 +
security {<br>
 +
max_attributes = 200<br>
 +
reject_delay = 1<br>
 +
status_server = yes<br>
 +
}<br>
 +
&nbsp;<br>
 +
proxy_requests&nbsp; = yes<br>
 +
$INCLUDE proxy.conf<br>
 +
$INCLUDE clients.conf<br>
 +
&nbsp;<br>
 +
thread pool {<br>
 +
start_servers = 5<br>
 +
max_servers = 32<br>
 +
min_spare_servers = 3<br>
 +
max_spare_servers = 10<br>
 +
max_requests_per_server = 0<br>
 +
}<br>
 +
&nbsp;<br>
 +
modules {<br>
 +
$INCLUDE ${confdir}/modules/<br>
 +
}<br>
 +
&nbsp;<br>
 +
instantiate {<br>
 +
exec<br>
 +
expr<br>
 +
expiration<br>
 +
logintime<br>
 +
}<br>
 +
&nbsp;<br>
 +
$INCLUDE policy.conf<br>
 +
$INCLUDE sites-enabled/</small></td>
 +
<small> </small></tr>
 +
<small></small>
 +
</tbody>
 +
</table>

Revisió de 15:15, 16 març 2014

Icona d'esboç

Aquest article està en desenvolupament. Pràcticament totes les pàgines del Wiki de Guifi.net són editables, però en aquesta falta informació essencial. Ampliant-ho ajudaràs a millorar Guifi.net.
Potser puguis ajudar-te amb els wikis castellà i anglès si tenen una pàgina equivalent.

FreeRADIUS

Introducció

Intenció: disposar d'un mecanisme d'autenticació federat compatible amb serveis (pptp, openvpn, squid, hotspots,..) per ampliar la capacitat dels servidors proxy o hotspot, per validar usuaris de guifi.net.

Es tria Radius perquè permet extendre la validació que ja s'ofereix via LDAP_SSL, i poder federar directament trastos Mikrotik, o serveis no compatibles amb LDAP com ara PPTP.

Requisits

Es parteix d'un servidor Debian/Ubuntu configurat amb guifi-proxy3.

Instal·lació i configuració

Entrem per ssh a la màquina:

  • Actualitzem els paquets
# apt-get update
# apt-get upgrade
  • Instal·lem el freeRADIUS
# apt-get install freeradius freeradius-ldap
  • Editem els arxius de configuració
/etc/freeradius/radiusd.conf
<tbody width="424"> </tbody>
prefix

= /usr
exec_prefix = /usr
sysconfdir = /etc
localstatedir = /var
sbindir = ${exec_prefix}/sbin
logdir = /var/log/freeradius
raddbdir = /etc/freeradius
radacctdir = ${logdir}/radacct
 
name = freeradius
 
confdir = ${raddbdir}
run_dir = ${localstatedir}/run/${name}
 
db_dir = ${raddbdir}
 
libdir = /usr/lib/freeradius
pidfile = ${run_dir}/${name}.pid
 
user = freerad
group = freerad
 
max_request_time = 30
cleanup_delay = 5
max_requests = 1024
 
listen {
type = auth
ipaddr = *
port = 0
}
 
listen {
ipaddr = *
port = 0
type = acct
}
 
hostname_lookups = no
allow_core_dumps = no
 
regular_expressions    = yes
extended_expressions    = yes
 
log {
destination = files
file = ${logdir}/radius.log
syslog_facility = daemon
stripped_names = no
auth = no
auth_badpass = no
auth_goodpass = no
}
 
checkrad = ${sbindir}/checkrad
 
security {
max_attributes = 200
reject_delay = 1
status_server = yes
}
 
proxy_requests  = yes
$INCLUDE proxy.conf
$INCLUDE clients.conf
 
thread pool {
start_servers = 5
max_servers = 32
min_spare_servers = 3
max_spare_servers = 10
max_requests_per_server = 0
}
 
modules {
$INCLUDE ${confdir}/modules/
}
 
instantiate {
exec
expr
expiration
logintime
}
 
$INCLUDE policy.conf

$INCLUDE sites-enabled/
Eines de l'usuari