Home bread crumb arrow icon Tutorials bread crumb arrow icon How to Install Radius Server on Ubuntu 22.04

How to Install and Configure a Radius Server on Ubuntu 22.04

How to Install and Configure a Radius Server on Ubuntu 22.04
Richard (Senior Manager)
Study duration : 6 Minutes
0 Comment
2026/04/27

If you’ve ever needed to control who can access your network and keep track of their activity, Radius is what you want. It stands for Remote Authentication Dial-In User Service, and it basically lets you handle authentication, permissions, and logging from one place. In this guide, I’ll walk you through installing a Radius server on Ubuntu 22.04, step by step, no fluff, so you can have a secure network without the headache.

Step 1: Update Your Ubuntu 22.04 System

Before installing the Radius server, one should verify that your system is updated. Launch a terminal and please type in the following commands:

sudo apt update
sudo apt upgrade

Step 2: Install FreeRadius on Ubuntu 22.04

FreeRadius is a Radius server which is open-source that is used in this tutorial. The FreeRadius package can be installed by running the following command:

sudo apt install freeradius

Step 3: Configure Your Radius Server (Practical Example)

Once FreeRadius is installed, you need to configure it for your network. Let’s do a simple example:

1. Add a test client (your computer or device):

Edit /etc/freeradius/3.0/clients.conf and add:

client mypc {
ipaddr = 192.168.1.100
secret = testing123
shortname = mypc
}

Here, 192.168.1.100 is the IP of your testing machine, and testing123 is the shared secret.

2. Add a test user:

Edit /etc/freeradius/3.0/users and add:

testuser Cleartext-Password := "password123"

This creates a user testuser with the simple password password123.

3. Restart FreeRadius in debug mode:

sudo freeradius -X

This will show live logs in the terminal so you can see authentication attempts and errors.

4. Test the connection from the client:

On the client machine (or the same server), run:

radtest testuser password123 127.0.0.1 0 testing123

Expected output:

Sending Access-Request of id 123 to 127.0.0.1 port 1812
User-Name = "testuser"
User-Password = "password123"
...
Received Access-Accept

This confirms that the authentication is successful.

Step 3.1: Quick Security Tips for Your Radius Server

– Limit clients: Only allow specific IPs in ‘clients.conf’.

– Use strong passwords for users.

– Check logs with ‘sudo freeradius -X’.

– Backup your config files before changes.

– Keep your system updated.

Step 4: Start and Enable Your Radius Server

After the FreeRadius has been configured, start the Radius server using the command below:

sudo systemctl start freeradius

You can also have FreeRadius start at boot time by executing the following command:

sudo systemctl enable freeradius

Step 5: Test Your Radius Server with radtest

If you want to perform a Radius server test, you can use the radtest utility which is part of the FreeRadius software package. Do execute the following command, of course substituting ‘username’ and ‘password’ with desired values:

radtest username password localhost 0 testing123

You should be seeing a reply that says that the authentication was successful.

Conclusion: Your Radius Server is Ready and Secure

Alright, that’s all there is to it. Your Radius server is now running on Ubuntu 22.04. You can manage who connects, track what they do, and control access without breaking a sweat. Don’t be afraid to tinker with FreeRadius’ settings, you’ll quickly find what fits your network best.

Share this post
0

Comments and questions