Setting up external Radius server for Hotspot authentication: Difference between revisions
Setting up external Radius server for Hotspot authentication (view source)
Revision as of 11:40, 28 October 2022
, 28 October 2022no edit summary
mNo edit summary |
mNo edit summary |
||
Line 12: | Line 12: | ||
==Preparing Ubuntu machine== | ==Preparing Ubuntu machine== | ||
====Installing the server==== | |||
---- | |||
Firstly, update the package list and upgrade to the latest packages: | Firstly, update the package list and upgrade to the latest packages: | ||
Line 17: | Line 20: | ||
sudo apt update | sudo apt update | ||
sudo apt upgrade | sudo apt upgrade | ||
</pre> | |||
Next, install freeradius package: | |||
<pre> | |||
sudo apt install freeradius | |||
</pre> | |||
====Defining a Client==== | |||
---- | |||
Client - Hotspot that will use freeradius to authenticate users. | |||
In order to add/edit clients, we need to access clients.conf file, use your favourite text editor to access it: | |||
<pre> | |||
sudo nano /etc/freeradius/3.0/clients.conf | |||
</pre> | |||
For this example we will add the following lines in order to accept any IP address as a client: | |||
<pre> | |||
client 0.0.0.0/0 { | |||
secret = demosecret | |||
shortname = 0.0.0.0/0 | |||
} | |||
</pre> | |||
Note: IP of a specific Public IP of the client can be used instead of 0.0.0.0/0 | |||
====Defining a User and Password==== | |||
---- | |||
Before we create a user and password, let's use MD5 encryption instead of a clear text password. We will generate MD5 for '''demo123''' password using the following command: | |||
<pre> | |||
echo -n demo123| md5sum | awk '{print $1}' | |||
</pre> | |||
We will now define credentials for user '''demo'''. Use your favourite text editor to open '''users''' file: | |||
<pre> | |||
sudo nano /etc/freeradius/3.0/users | |||
</pre> | |||
Add required lines to the file: | |||
<pre> | |||
demo MD5-Password:= "62cc2d8b4bf2d8728120d052163a77df" | |||
Reply-Message := "%{User-Name} authenticated successfully" | |||
</pre> | </pre> |