How to setup Freeradius (use with CoovaChilli)
You can download Freeradius from here http://freeradius.org/ and CoovaChilli from github here https://github.com/coova/coova-chilli official website of CoovaChilli
Package to build the install:
sudo apt-get update sudo apt-get install build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip git curl htop libmysqlclient-dev libperl-dev libtalloc-dev linux-headers-server devscripts debhelper gengetopt libtool automake
install of Freeradius:
tar -xvpzf freeradius-server-3.0.10.tar.gz cd freeradius-server-3.0.10 ./configure make sudo make install sudo ldconfig
It make the install in folder /usr/local/etc/raddb
need to be root for go inside (sudo su
)
Create softlink for modules that you want to add:
sudo su cd /usr/local/etc/raddb cd mods-enabled/ ln -s ../mods-available/sql ./ cd ..
Edit with vim the file mods-available/sql
and put information about your mysql database (http://wiki.freeradius.org/guide/SQL-HOWTO)
driver = "rlm_sql_mysql" ... dialect = "mysql" ... # Connection info: # server = "localhost" port = 3306 # Database table configuration for everything except Oracle ...... # Set to 'yes' to read radius clients from the database ('nas' table) # Clients will ONLY be read on server startup. read_clients = yes
Enable SQL configuration in the default enabled site sites-available/default
Import the MySQL schema from /mods-config/sql/main/mysql/schema.sql
mysql -u root -p database < mods-config/sql/main/mysql/schema.sql
For openssl problem: freeradius-refusing-to-start-with-libssl
For solve can set allow_vulnerable_openssl = yes in radiusd.conf
To test freeradius
radiusd -Xx
To test authentication
radtest {username} {password} {hostname} 10 {radius_secret}
FreeRADIUS has a start-up script. The following will ensure automatic start-up between reboots
cp /usr/local/sbin/rc.radiusd /etc/init.d/radiusd update-rc.d radiusd start 99 2 3 4 5 . stop 20 0 1 6 .
Config for work with CoovaChilli
In site-enabled edit the file default and in authorize section activate sql and add noresetcounter
# Autz-Type Status-Server { # # } noresetcounter }
Simultaneous-use
Expiration
Max-All-Session
CoovaChilli-Bandwidth-Max-Down
For can use coova chilli attribute you need to copy in /usr/local/share/freeradius the CoovaChilli.dictionary (available in doc folder on github of coova) and add the line in dictionary:
Leave a Comment
You must be logged in to post a comment.