How to Install FreeRADIUS on Ubuntu.
The next article will show you how to install and configure a FreeRADIUS server on top of an Ubuntu host. RADIUS is used as an authentication server for users who connect to and use a specific network service such as VPN.
RADIUS is a network protocol that provides authentication, authorization, and accounting (AAA). This means that the RADIUS server can authenticate users (authentication), can block users from accessing certain resources (authorization), and can log all login attempts and store a user database (accounting).
Install FreeRADIUS on Ubuntu
First things first, once logged into the Ubuntu host, we can install Freeradius using the apt-get install command:
$ sudo apt-get install freeradius
After the installation is complete, let’s check if it was actually installed by running the following command:
$ freeradius –v
After that, let’s run a quick configuration check:
$ sudo freeradius –CX
Now that it’s installed and running, we’ll go over the configuration and make any necessary changes.
The Freeradius config file is located in / etc / freeradius, so let’s change our directory to this location and continue:
$ cd / etc / freeradius $ sudo vi /etc/freeradius/radius.conf
Let’s increase the default maximum number of requests from 1024 to 2048 if we plan to have more than five clients connecting at the same time:
Next, we need to make sure that $ INCLUDE clients.conf is present in the config file. You can put it on any line without comments in the config file. The clients.conf file basically contains a list of all the services that will allow this server to authenticate users.
The next step is to add clients (devices that will use this RADIUS server to authenticate users):
$ vi /etc/freeradius/clients.conf client OOB {ipaddr = 192.168.0.10 secret = secretpassword}
We created a new client called OOB and then added a baseline configuration that includes the client’s IP address and secret password that is used to secure communication between the RADIUS server and the client device.
Now that we are done with this part, we will start adding users. We do this by editing the users file:
$ vi users
Then we add the following line:
sabrin Cleartext-Password: = Password
Sabrin is the username followed by the type of password we need and the password itself.
Once this is done, we start the FreeRADIUS server using the following command:
$ service freeradius start
This is it! Now you just need to set up your device with Freeradius Server and you’re done! Enoy!