Install FreeRADIUS v3 on Centos 7
Install packages
Populate MySql db
Configure RADIUS
Edit radiusd.conf
modules {
$INCLUDE mods-enabled/
}
policy {
$INCLUDE sites-enabled/
}
$INCLUDE mods-enabled/
}
policy {
$INCLUDE sites-enabled/
}
Enable SQL configuration in the default enabled site /etc/freeradius/sites-available/default:
authorize {
…
sql
…
}
accounting {
…
sql
…
}
session {
…
sql
…
}
post-auth {
…
sql
…
}
Post-Auth-Type REJECT {
sql
}
Configure SQL module /raddb/mods-available/sql and change the database connection parameters to suite your environment:
sql {driver = “rlm_sql_mysql”
server = “192.168.1.1”
port = 3306
login = “radius”
password = “radiuspwd”
- Database table configuration for everything except Oracle
radius_db = “radius”
}
- Set to ‘yes’ to read radius clients from the database (‘nas’ table)
- Clients will ONLY be read on server startup.
read_clients = yes
- Table to keep radius client info
client_table = “nas”
Test to see if Free Radius works by issuing the following command:
This will start FreeRadius in debug mode ( To stop it -> Ctrl+c).
Install daloradius
Download daloradius and updated sql
Config daloradius sql connection
Config apache
Edit the /etc/httpd/conf/httpd.conf file and append this to the end of the file (customize to your likings):
Alias /myradius "/var/www/daloradius/"
<Directory /var/www/daloradius/>
Options None
order deny,allow
deny from all
allow from 127.0.0.1
allow from <my management system's ip which has a web-browser>
</Directory>
Alias /myradius "/var/www/daloradius/"
<Directory /var/www/daloradius/>
Options None
order deny,allow
deny from all
allow from 127.0.0.1
allow from <my management system's ip which has a web-browser>
</Directory>
Thanks for sharing. Quick question. I was able to install everything, but in the end I am getting error 500. Any ideas?
ReplyDeleteProbably you must move all data from /tmp/daloradius-0.9.9 for /var/www/html/daloradius and don't forget disabling SELINUX.
DeleteMake sure Peral-DB is installed correctly.
DeleteI am trying this now. I will update the result. I hope for a positive project.
ReplyDeletei have this problem in the radiusd -x The server is not configured to listen on any ports. Cannot start
ReplyDeletethe problem solved only with this difference
Deletemodules {
$INCLUDE mods-enabled/
}
for
modules {
}
$INCLUDE mods-enabled/
It seems there is another setting in the sql file which is that dialect needs to be set to mysql. It is sqllite by default.
ReplyDeleteThere is no php-pear-DB in CentOS 7 default repos.
ReplyDeleteYou can fix this.
ReplyDeleteyum install epel-release
yum install php-pear-DB
https://fedoraproject.org/wiki/EPEL
NOTE for CentOS users
You can install EPEL by running yum install epel-release. The package is included in the CentOS Extras repository, enabled by default.
https://poltakjefferson.wordpress.com/2014/01/07/install-freeradius-with-web-based-management-daloradius-on-centosrhel-debian-ubuntu/
ReplyDelete