FreeRadius Step By Step Installation

 

Radius Step by Step installation on centos 5 & 6
 
Just follow the instructions below to have your FreeRADIUS setup ready to go when used along with our WHMCS module, we have distinguished the difference between CentOS commands
 
CentOS 5:
root@cloudradius.com#yum install freeradius2 freeradius2-mysql freeradius2-utils mysql-server -y
 
CentOS 6:
root@cloudradius.com#yum install freeradius freeradius-mysql freeradius-utils mysql-server -y

/etc/init.d/iptables stop
chkconfig iptables off 

To setup MySQL, start the service by running below:
root@cloudradius.com#service mysqld start
 
Create a root passworld for mysql:
root@cloudradius.com#mysqladmin -u root password radius123 (change the password radius123 to your password )
 
Login into mysql using:
root@cloudradius.com#mysql -u root -p
 
Now create the database and grant all privileges to user radius:
mysql>CREATE DATABASE cloudradius;
 
mysql>GRANT ALL PRIVILEGES ON cloudradius.* TO radius@localhost IDENTIFIED BY "radpass";
and
mysql>GRANT ALL PRIVILEGES ON cloudradius.* TO radius@'WHMCS IP' IDENTIFIED BY 'radpass';

( NOTE: please add your whmcs ip in place of 'WHMCS IP' field above )

mysql>
flush privileges;
mysql>exit

 
 
Now open up CentOS:/etc/raddb/sql.conf and enter your mysql database details you just created, Example:
root@cloudradius.com#vi /etc/raddb/sql.conf
# Connection info:
server = "localhost"
#port = 3306
login = "radius"
password = "radpass"
# Database table configuration for everything except Oracle
radius_db = "radius"

and save 
to save changes ( shift : and type wq and enter)
 

In /etc/raddb/radiusd.conf ensure that the line saying is uncommented:
$INCLUDE sql.conf
 
***IMPORTANT***
Edit /etc/raddb/sites-available/default and uncomment the line containing ‘
sql’ in the "authorize"{} section and ‘sql’ in the "accounting" {} section, also uncomment ‘sql’ under "session" {}.
Additionally, edit /etc/raddb/sites-available/inner-tunnel and uncomment the line containing ‘sql’ under “authorize" {} and under "session" {}.
 
Open up /etc/raddb/clients.conf set your secret to something a bit more random, example:
Change:
secret = testing123  ( Change testing123 to your password )

To configure IP-Pool Via MYSQL DB please configure below.

uncomented line " $INCLUDE sqlippool.conf" in /etc/raddb/radiusd.conf

we need change the line "$INCLUDE sql/postgresql/ippool.conf" to ""$INCLUDE sql/mysql/ippool.conf" in /etc/raddb/sqlippool.conf

we need to add "sqlippool" line in "Accounting" and "Post-Auth" sections in /etc/raddb/sites-enabled/default


 
Now check to see if Radius is working ok by restarting:
root@cloudradius.com#service radiusd restart
or
root@cloudradius.com#
service freeradius restart

Radius installation is Done
 
OPTIONAL
To add clients (External VPN Servers) you would edit CentOS: /etc/raddb/clients.conf and directly under this line:
# coa_server = coa
}
 
Add a block such as this:
client VPN_SERVER_IP {
secret = YOUR SECRET HERE
shortname = yourVPN
nastype = other
}
 
To allow external servers and software to authenticate off your FreeRADIUS, this has to be done every time you setup an external server to use this FreeRADIUS database.
 
Everytime you add a client or change a value in the config files you need to restart radius like this:
root@cloudradius.com#service radiusd restart
 
**Please follow below if using our WHMCS FreeRADIUS Module and UAS System:**
 
Open up /etc/raddb/sql.conf for CentOS or /etc/freeradius/sql.conf for Ubuntu and uncomment the following line:
#readclients = yes
to:
readclients = yes
 
Now your FreeRADIUS will read off the MySQL NAS table for clients – when adding NAS servers via our UAS system it will auto create the NAS table in your FreeRADIUS databases the first time you add a client.

 Click to see how to setup your Mikrotik Router with Freeradius/CloudRadius  

 
REMEMBER TO INSTALL IONCUBE!

Regards

CloudRadius Team

 

Was this answer helpful?

 Print this Article

Also Read

Mikrotik Setup

Enable Icoming on port 37991 - open winbox2 - left menu radius 3 - click on incoming4 - tick...

Install Scripts in FreeRadius

These are the script files in the...

Steps to follow to install

1- Install Freeradiushttp://my.cloudastrix.com/knowledgebase.php?action=displayarticle&id=2...

How to add Dictionary on FreeRadius and CloudRadius.

How to add Dictionary on freeradius and cloudradius.Go to /user/share/freeradius/dictionary.XXand...

CloudRadius Installation

Installation The CloudRadius Module is a value addon to your WHMCS Software. CloudRadius can be...