How to Install FreeRADIUS on Fedora Server Latest

FreeRADIUS is a widely used open-source RADIUS server that provides various authentication and accounting services, such as Wi-Fi, dial-up, and VPN network access control. If you want to install FreeRADIUS on your Fedora Server, follow these simple steps.

Prerequisites

Before installing FreeRADIUS, make sure that you have the following prerequisites:

Step 1: Install FreeRADIUS

  1. Open the Terminal on your Fedora Server.

  2. Update the package repository index and the installed packages by running the following command:

$ sudo dnf update -y
  1. Install the FreeRADIUS package by running the following command:
$ sudo dnf install freeradius -y
  1. Once the installation is complete, start the FreeRADIUS service by typing the following command:
$ sudo systemctl start radiusd
  1. Verify the status of the FreeRADIUS service by running the following command:
$ sudo systemctl status radiusd

If the service is running correctly, you will see the 'active (running)' status message.

  1. By default, the FreeRADIUS configuration file is located in the '/etc/raddb/' directory. Make a backup of the original configuration file by running the following command:
$ sudo cp /etc/raddb/radiusd.conf /etc/raddb/radiusd.conf.orig

Step 2: Configure FreeRADIUS

  1. Open the FreeRADIUS configuration file '/etc/raddb/radiusd.conf' in your preferred text editor. For example, you can use the nano editor by typing the following command:
$ sudo nano /etc/raddb/radiusd.conf
  1. Uncomment the line that starts with '# $INCLUDE clients.conf' to activate the 'clients.conf' configuration file. Save and close the file.

  2. Edit the 'clients.conf' file by running the following command:

$ sudo nano /etc/raddb/clients.conf
  1. Add IP address or hostname of the clients that you want to give access to your server. For example, to give access to a client with IP address '192.168.1.100', add the following lines:
client 192.168.1.100 {
    secret = mysecretkey
    shortname = myhostname
}

Make sure to replace 'mysecretkey' with a secret of your choice.

  1. Save and close the 'clients.conf' file.

  2. Restart the FreeRADIUS service to apply the changes by running the following command:

$ sudo systemctl restart radiusd

Step 3: Test FreeRADIUS

  1. Test the FreeRADIUS server by using the 'radtest' command. For example, to test the authentication for the user 'test' with the password 'password' against the client '192.168.1.100', run the following command:
$ sudo radtest test password 192.168.1.100 0 mysecretkey

If the authentication is successful, you will see the 'Access-Accept' message.

  1. Verify the accounting functionality using the 'radacct' command. For example, to view the accounting data for the user 'test' on the client '192.168.1.100', run the following command:
$ sudo radacct -f /var/log/radius/radacct/192.168.1.100/detail-$(date +%Y%m%d)

Conclusion

In this tutorial, you learned how to install and configure FreeRADIUS on Fedora Server Latest. You also learned how to test the authentication and accounting functionality of the FreeRADIUS server.

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!