It's all about creating an authentication server for the wireless router.

Installing FreeRadius on debian server#

Open the terminal and run these commands:

apt update apt install freeradius

After the installation is complete, we need to edit client file:

nano /etc/freeradius/3.0/clients.conf

Then add the block below, which has the TP-Link router IP address, a shared secret used for authentication between the server and the router, and a shortname (any name works).

client 192.168.0.1 { secret = testing123 shortname = homewifi }

After that we need to edit users file:

nano /etc/freeradius/3.0/users

and add the needed user by pasting this block at the beginning of the users file (the second line must be indented):

testuser Cleartext-Password := "password_complex" Reply-Message := "Hello, %{User-Name}"

Now, enable the freeradius service and restart it so it picks up the new configuration:

systemctl enable freeradius systemctl restart freeradius

You can test the user locally before touching the router:

apt install freeradius-utils radtest testuser password_complex 127.0.0.1 0 testing123

We are done with the installation and the configuration, now simply go to the TP-Link router, open Wireless Security and select WPA/WPA2-Enterprise. Under RADIUS Server IP put the IP of the RADIUS server, and under RADIUS Password put the secret configured inside clients.conf.