How To Install and Setup Freeradius Server in Linux (RHEL - CentOS 7 - 8) Using 6 Easy Steps - CyberITHub
How To Install and Setup Freeradius Server in Linux (RHEL - CentOS 7 - 8) Using 6 Easy Steps - CyberITHub
Menu
Table of Contents
Install and Setup FreeRadius Server in Linux
Step 1: Prerequisites
Step 2: Update Your System
Step 3: Install Freeradius packages
Step 4: Start Freeradius Service
Step 5: Check the Clients.conf and Users File
Step 6: Test Your Configuration
Advertisements
In this article, I will take you through the steps to install and setup Freeradius Server in Linux
(RHEL/CentOS 7/8). The FreeRadius server project is the implementation of the Remote
Authentication Dial-In User Service (RADIUS) protocol used by many corporations and Internet
service providers to authenticate users connecting from remote locations.
The FreeRadius server daemon, radiusd , can use an LDAP directory in two different ways. First,
it can use LDAP as a data store for RADIUS attribute values. RADIUS attributes are defined by
the RADIUS protocol and should not be confused with LDAP attributes. The only similarity
between the two types of attributes is that both have names and are used to store values. The
FreeRadius administrator defines the mapping between RADIUS attributes and the LDAP
attributes used to represent them. Now we will go ahead and see how to setup freeradius
server in this section.
Install and Setup FreeRadius Server in Linux
Step 1: Prerequisites
b)You should have yum installed in your system. You can check Top 22 YUM Command
Examples in RedHat /CentOS 7 to know more about yum command.
b)You should have sudo access to run privileged commands. You can check How to add User
to Sudoers to know more about providing sudo access to the User.
Sometimes it might happen that installation of new packages requires few of the dependencies
to be updated hence you need to first update your system packages to the latest version
before proceeding with the steps to setup freeradius Server. This can be performed by using
simple yum update -y command as shown below. This command might take sometime to
update all the packages depends on the last time you have updated your system. In this case
there are plenty of updates need to be installed so it took me few mins to complete the
System update.
Advertisements
[root@localhost ~]# yum update -y
Resolving Dependencies
You can install freeradius packages using yum install command as shown below. Along with
freeradius package you require another set of packages like freeradius-utils, freeradius-mysql
and freeradius-perl packages. All of the packages can be installed in just one command as you
can see below.
Dependencies Resolved
====================================================================================
Package Arch Version Repository Size
====================================================================================
Installing:
Transaction Summary
====================================================================================
Install 4 Packages (+45 Dependent packages)
Installed size: 52 M
Is this ok [y/d/N]: y
Downloading packages:
-----------------------------------------------------------------------------------
Total 15 MB/s | 17 MB 00:00:01
Running transaction
Installed:
Dependency Installed:
Complete!
After installation of freeradius packages if you check the radiusd service then you can see this
service in inactive state. This service will not start by default hence you need to manually start
it.
To start radiusd service, you can either use our traditional service radiusd start command or
you can use systemctl start radiusd command. Both should work fine.
Now if you check the status again you can see the service is started and running fine.
Tasks: 6
Memory: 8.4M
CGroup: /system.slice/radiusd.service
NOTE:
Please note that sometimes service does not start due to SELinux policy or Firewall
rules. It might block the port used by Freeradius service or might block the service
itself. Hence it is recommended to check your SELinux policy and firewall rules
whenever service failed to start.
Now we need to setup the client in /etc/raddb/clients.conf file. Here we are using default
client localhost in our freeradius server setup.
client localhost {
ipaddr = 127.0.0.1
secret = testing123
require_message_authenticator = no
nas_type = other
You can use default bob user to setup freeradius server as shown below. You can setup your
User and cleartext-Password in /etc/raddb/users.
Framed-IP-Address = 192.168.10.10,
Now you need to restart your service for the changes to reflect.
[root@localhost ~]# systemctl restart radiusd
Once setup is completed you can actually test the setup by using below radtest command.
Here we are trying authenticate to RADIUS Server through User Bob and by using password
hello as you can see below. Once the authentication went successful you will receive Accept-
Accept message. This shows that you have completed the steps to setup freeradius server.
User-Name = "bob"
User-Password = "hello"
NAS-IP-Address = 172.31.9.24
NAS-Port = 100
Message-Authenticator = 0x00
Cleartext-Password = "hello"
bob: User-name
hello: User-Password
testing123: Cleartext-Password
Recommended Posts:-
MORE, Linux
leszek
september 30, 2020 at 9:00 pm
Reply
ken
november 30, 2021 at 9:03 am
cyberithub
december 5, 2021 at 3:08 pm
Hi Ken,
Reply
dharmbir singh
may 8, 2022 at 6:42 pm
After installation on public IP, unnecessary traffic problem with the freeradius server,
Reply
Leave a Comment
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Post Comment
Categories
Ansible
AWS
Azure
Bash
C
C#
C++
Chef
Cloud
Database
DevOps
Docker
ELK
Git
GO
Google
HTML
Interview Questions
JAVA
JAVASCRIPT
Kubernetes
Linux
MORE
MYSQL
Networking
Node.js
Openstack
Oracle
PERL
PHP
Powershell
Programming
Puppet
PYTHON
Redis
Ruby
Scripting
Security
Solaris
Terraform
Windows
Recent Posts
Recent Comments
Manga on What is Manga | 7 Best Open Source Manga Reader for Linux
Mihai on Solved "Failed to download metadata for repo AppStream"
First Name *
First Name *
Last Name
Last Name
Email Address *
Email Address *
Keep me posted!