How to Install FreeRADIUS on Debian Latest

FreeRADIUS is a popular open-source RADIUS server that provides authentication, authorization, and accounting services. In this tutorial, we will guide you on how to install FreeRADIUS on the latest Debian release.

Prerequisites

Before you start with the installation, ensure that you have the following prerequisites:

Step 1: Update the System

It is essential to update your Debian system before installing any packages. You can do this by running the following command:

sudo apt update && sudo apt upgrade -y

Step 2: Install FreeRADIUS

To install FreeRADIUS on Debian, you can run the following command:

sudo apt install freeradius -y

The above command will install FreeRADIUS and all its dependencies.

Step 3: Configure FreeRADIUS

After installing FreeRADIUS, you need to configure it based on your requirements. The configuration files for FreeRADIUS are located in the /etc/freeradius/ directory.

cd /etc/freeradius/

You can modify the configuration files by using your preferred text editor. For example, let's open the clients.conf file using nano:

sudo nano clients.conf

Step 4: Start FreeRADIUS

To start FreeRADIUS, run the following command:

sudo systemctl start freeradius

You can check the status of the service by running the following command:

sudo systemctl status freeradius

If the service is running correctly, you should see an output similar to the following:

● freeradius.service - FreeRADIUS multi-protocol policy server
   Loaded: loaded (/lib/systemd/system/freeradius.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2021-10-09 08:49:16 UTC; 4s ago

Step 5: Test FreeRADIUS

You can test FreeRADIUS by running the following command:

sudo radtest username password 127.0.0.1 0 testing123

The output should be similar to the following:

Sending Access-Request of id 164 to 127.0.0.1 port 1812
        User-Name = "username"
        User-Password = "password"
        NAS-IP-Address = 192.168.0.20
        NAS-Port = 0
        Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=164, length=20

Conclusion

That's it! You have successfully installed and configured FreeRADIUS on Debian. You can now use FreeRADIUS to authenticate users and devices on your network.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!