Thursday 15 April 2021

freeRadius Installation in Oracle Linux 8, RedHat 8 and CentOS Stream



 Installation of freeRadius in Oracle Linux 8

# dnf -y update

# dnf search freeradius

# dnf -y install freeradius


Config File location: 

/etc/raddb

Two most important files within /etc/raddb are: -

/etc/raddb/clients.conf

It is where details of client router, switch, pc etc will be here

Basic conf would be like this, make sure you take a backup

#  vim /etc/raddb/clients.conf

clients testpc {

    ipaddr = 192.168.1.1

    shortname = Windows10-PC

    secret   = blabla+123

}

clients router {

ipaddr = 10.10.1.1

shortname = CiscoRouter

secret   = Hmm+098

}

Make sure there is no space

/etc/raddb/users

It is where user info will be located, username pass etc

Basic conf would be like this, make sure you take a backup

○ # vim /etc/raddb/users

bob   Cleartext-Password := "hello"

Enable firewall for port 1812 and 1813
# systemctl status firewalld
# systemctl start firewalld
# firewall-cmd --permanent --zone=public --add-port=1812/udp
# firewall-cmd --permanent --zone=public --add-port=1813/udp
# firewall-cmd --reload
# firewall --list-all

Check if ports are up and running

# netstat -unlp 

To check logs

# vim /etc/raddb/radius.conf


To do a testing you can download a tool called ntradping or you can use radtest command. 

I won't go through how to use ntradping but I will walk you through radtest command

Make sure you open 2 SSH session with on freeradius server

Stop the freeradius service

# systemctl stop radiusd

Go to debugging mode

# radiusd -X


Now, on another SSH session start your radtest
# radtest bob hello localhost 0 testing123

 


 If you go back to your other SSH session which is in debuggig mode you should see a something like this



No comments:

Post a Comment