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: install freeradius2 freeradius2-mysql freeradius2-utils mysql-server -y
CentOS 6: 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: mysqld start
Create a root passworld for mysql: -u root password radius123 (change the password radius123 to your password )
Login into mysql using: -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";
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 )

flush privileges;

Now open up CentOS:/etc/raddb/sql.conf and enter your mysql database details you just created, Example: /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
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:
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: radiusd restart
service freeradius restart

Radius installation is Done
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 {
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: 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
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  



CloudRadius Team

  • 166 Users Found This Useful
Was this answer helpful?

Related Articles

How to add Dictionary on FreeRadius and CloudRadius.

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

Mikrotik Setup

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

CloudRadius Installation

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

How to Install IonCube

Ioncube Installation Tutorial   About IonCube Loaders IonCube...