What is FreeRADIUS?

FreeRADIUS is an authentification, authorization and accounting protocol.  It was built in the dial-up era to manage users and keep track of the bandwidth usage by each connection for billing purposes.

It is still a very strong tool to use even today. It is fast to set up and many networking programs like OpenVPN, SotfEther, Squid proxy and wifi managing tools can be integrated with FreeRADIUS.

How to set up a RADIUS server?

There are two ways of setting up the FreeRADIUS server:

1. The hard way: installing it via a putty terminal and manually configuring it and troubleshooting. This method usually takes about 30 minutes if you know what you’re doing, and several hours if you’re a newbie.

2. The easy way: creating a new server instance and selecting the FreeRADIUS Ubuntu template from our DraculaServers.  This takes about 1 minute and everything works straight out of the box. You can deploy a radius server as described in this tutorial in 1 minute. To order a KVM Radius Server, click here.

Method 1— The Easy Way – 5 minutes

In 2019, there is no need to dive deep into the terminal for setting up a radius server. There is the option of getting a VPS that has the option of deploying radius. Find more about it.

Pre-Installed FreeRADIUS Servers

Automatic FreeRADIUS 3 + daloRADIUS Set Up

Instantly deploy machines with FreeRADIUS + MySQL + daloRADIUS GUI Panel already set up, receive the credentials and take over from there! You also get our custom WHMCS Module to help you manage it from our dashboard.

Pick one of our FreeRADIUS KVM plans

Method 2— The Hard Way

Good on you for not being afraid of getting your hands dirty! Let’s proceed with the manual FreeRADIUS install. If you don’t have 1 hour to waste, you can order a VPS that comes with FreeRADIUS already installed here.

Step 1 — Install FreeRADIUS 3 and FreeRADIUS modules

Step 2 — Install php

Step 3 — MySQL Server

Depending on the MySQL version, you may be asked to set the MySQL root password.  We will handle both scenarios in this tutorial.

Step 4 — MySQL Root Password config

If you were asked for a root password at the previous step, you can skip this.

Run the MySQL Secure to setup a root password and  other settings.

If you know how to chose a strong password, select No.

Select Y and set your root password.

Step 5 — Create the FreeRADIUS database schema 

Now that we have a database, let’s populate it with the radius schema.

Step 6 — Set FreeRADIUS to use SQL

FreeRADIUS comes by default set to use files for users.

Open the “default” config file with your favorite text editor.

For all categories, remove the “file” directive and add the “sql” one. This will instruct FreeRADIUS to relly on the database for user management.

Step 7 — Edit the radius SQL module’s config 

Open the configuration file:


Modify the following values:

Step 8 — Run FreeRADIUS 

Being the first time firing up radius, better use the debug mode by adding “-X”

If everything is OK you should see something like this.

 

Step 9 — GUI WebPanel 

You can add a web panel to radius for easy user creation and management.

Please follow this tutorial on how to install the DaloRadius GUI web panel on a radius server, then return to this page to continue.

There are several options out there. Our FreeRADIUS VPS come with DaloRadius installed.

 

Step 10 —  Create a NAS Client & User

For another computer to use our new radius server, it needs to be added in the nas client table in the radius database.

To add a Nas using Daloradius, go to Managemnt > Nas > New Nas

 

To add an User in DaloRadius, go to Management > Users > New Users

 

There are plenty of attributes that can be set to users and users groups, but we will not get into that during this tutorial.

Now that we have created a Nas Client  and an User, we should test them. Everytime we add a new NAS , we need to reload FreeRADIUS so that it fetches the refreshed table. Close and run radius again:

 

Step 10 — Testing with NTRadPing

A very cool tool for testing radius servers is NTRadPing. You can download it here: ntradping.

Add your radius server’s ip, change the port to 1812, insert your NAS secret and User credentials from the previous step.

Clicking “Send” should reply a message.

NTRadPing should display something like this when it succesfully validates an user against the radius server:

The Freeradius debug output should look something like this when the user is authenticated:

Step 11 — Final Notes

It was a bit of work, but you now have a working FreeRADIUS server!

If you’re having issues please keep in mind that DraculaServers offers instant KVM FreeRADIUS Servers.

They come with FreeRADIUS 3 + Daloradius Panel + PhpMyAdmin already installed, so you can focus on your business instead of wasting time troubleshooting various error codes. Please see our FreeRADIUS VPS offer for more details.

You can learn more about radius by reading our Creating a profile with bandwidth limit tutorial.

Pre-Installed FreeRADIUS Servers

Automatic FreeRADIUS 3 + daloRADIUS Set Up

Instantly deploy machines with FreeRADIUS + MySQL + daloRADIUS GUI Panel already set up, receive the credentials and take over from there! You also get our custom WHMCS Module to help you manage it from our dashboard.

Pick one of our FreeRADIUS KVM plans


Leave a Comment

LIMITED TIME SPECIAL 💀

Enter your email below to get 20% OFF on any of our Linux VPS plans and receive weekly deals on our services!