Steps to Install freeRADIUS without DB in Ubuntu

RADIUS

RADIUS stands for Remote Authentication Dial-In User Service is a networking protocol used for authentication, authorization, and accounting commonly referred to as AAA solution. RADIUS is generally used for authenticating network devices such as routers, ...

freeRADIUS

freeRADIUS is a software which implements RADIUS protocol.

Steps to install freeRADIUS

freeRADIUS can be installed in two way with or without database module. In this article we will follow steps to install freeRADIUS without any additional database.

Step 1: Install Radius

sudo apt-get install freeradius

Once installation is complete use the below command to check freeradius status

sudo service  freeradius status


Step 2 : NAS (Ignore this step for localhost authentication)

A Network Access Server aka NAS, entry for the server must be added to allow authentication from the server.

By default localhost is added with secret testing123.

In case you need to test authentication from server other than the installed setup NAS entry must be added.

vim /etc/freeradius/3.0/clients.conf

 Add the below entry

client myserver {

        ipaddr          = 172.20.10.12
        secret          = MySecret@876
}


Save the file and restart is necessary for the changes to apply.

sudo service freeradius restart

Step 3 : Create User

By default no user is provided. Therefore it is mandatory to create user to test authentication.

Edit the file

vim /etc/freeradius/3.0/users

Un-Comment the below lines

#bob     Cleartext-Password := "hello"
#        Reply-Message := "Hello, %{User-Name}"


Restart radius to reflect the changes

sudo service freeradius restart

Step 4 : Authenticate User

Command syntax

radtest {username} {password} {hostname} {port} {radius_secret}

radtest bob hello localhost 1813 testing123

Radius Responses

  • Access-Accept : for successful authentication
  • Access-Reject : for failed authentication
  • Access-Challange : for 2FA (will be explained in separate tutorial)

Successful authentication :

Failed authentication :

 

Authentication with custom NAS


To check log

less /var/log/freeradius/radius.log

 To start radius in debug mode

sudo freeradius -X 

To stop radius

sudo service freeradius stop

References

2) https://wiki.freeradius.org/guide/Basic-configuration-HOWTO


Comments

Popular posts from this blog

How to install Apache Tomcat in Ubuntu

How to install MRTG on UBUNTU

How to install MongoDB in Ubuntu