Technical Anshu
Tutorials Blog
📡 RADIUS Server Setup

FreeRADIUS Setup on Ubuntu Install Configure and First Test Login

The install genuinely takes about a minute. But a fresh FreeRADIUS authenticates nobody — no switch, no access point, no user exists yet. This guide does the install and then the three short steps that turn it into a working login server.

✍️ Technical Anshu🐧 Ubuntu Server📡 FreeRADIUS 3
🎥 Watch the full FreeRADIUS setup in the video, step by step

RADIUS is the quiet gatekeeper behind office WiFi logins, 802.1X switch ports and VPN sign-ins: the device asks the server, and the server says yes or no. FreeRADIUS on Ubuntu is the standard free way to run that gatekeeper. Below is the full honest path — install, first client, first user, and a local test with radtest — so that when you point a real access point at it, the first real login already works.

Terminal — freeradius -X (debug mode)
$ sudo systemctl stop freeradius $ sudo freeradius -X ... Listening on auth address * port 1812 bound to server default Listening on acct address * port 1813 bound to server default Ready to process requests
👆 The finish line of a healthy install: the server is listening on 1812 and 1813 and says it is ready (panel recreated with the real FreeRADIUS debug wording)
1

Install FreeRADIUS and the Test Tools

This really is the one-minute part. Two packages give you the server and the testing tools, and Ubuntu starts the service on its own.

  1. Refresh the package list: sudo apt update
  2. Install the server plus utilities: sudo apt install -y freeradius freeradius-utils
  3. Confirm the service is alive: sudo systemctl status freeradius — it should show active (running)
  4. Confirm the ports are listening: sudo ss -lunp | grep 1812 — UDP 1812 is authentication, UDP 1813 is accounting

All configuration lives in one place: /etc/freeradius/3.0/. You will mainly touch two files there — clients.conf and users.

2

Add One Client — the Device That Will Ask

A RADIUS server trusts nothing by default. Your switch, access point or VPN box is called a client (also called a NAS), and it must be registered with its IP address and a shared secret — a password both sides know. Open sudo nano /etc/freeradius/3.0/clients.conf and add a block like this at the end:

  1. client office-ap {
  2. ipaddr = 192.168.1.10 — the IP of your access point or switch
  3. secret = MyStrongSecret42 — use your own long, random secret; this one is only an example
  4. shortname = office-ap then close with }

The same secret must later be typed into the access point itself. If the two do not match exactly, the server silently ignores the device — no error, just nothing.

3

Add One User — the Person Who Will Log In

Now give the server somebody to authenticate. Open sudo nano /etc/freeradius/3.0/users and add this line at the top of the file, because FreeRADIUS reads this file top to bottom and the first match wins:

  1. testuser Cleartext-Password := "TestPass123"
  2. Save the file, then check the whole config before restarting: sudo freeradius -C — it must end with Configuration appears to be OK
  3. Restart the service: sudo systemctl restart freeradius

Plain-text test users are perfect for proving the setup works. For a real office you will later connect FreeRADIUS to your existing user database or Active Directory instead of keeping passwords in this file.

4

Prove It Works with Radtest

Never test a new RADIUS server by pointing real users at it. The radtest tool sends one fake login from the server itself, using the built-in localhost client whose default secret is testing123:

  1. Run: radtest testuser TestPass123 localhost 0 testing123
  2. The answer you want is Received Access-Accept — the login worked
  3. Received Access-Reject means the server answered but said no — wrong password or the user line is in the wrong place in the file
  4. No answer at all means the request never reached the server — service down, wrong port, or a secret mismatch

Only after this local test passes should you configure the same username, server IP and shared secret on your access point or switch and try a real login.

🔴 The honest note: the install takes a minute, but a default FreeRADIUS authenticates nobody real. It becomes a working login system only after a client, a user and a successful radtest — and it must only ever listen on your own LAN. Never forward UDP 1812 or 1813 from the internet.

🎥 Watch the Full FreeRADIUS Setup Video

The complete setup on a real Ubuntu server — install, first client, first user and the live test, all shown step by step in the video.

▶️ Watch Full Video
❓ Common Questions (FAQ)

Is FreeRADIUS really set up in one minute?

The installation is — two apt commands and the service is running. But a default install has no real clients and no real users, so it cannot log anybody in yet. Adding one client, one user and passing a radtest test takes a few more minutes, and only then is the setup actually finished.

What is the difference between UDP 1812 and 1813?

UDP 1812 carries authentication — the yes or no login decisions. UDP 1813 carries accounting — records of who logged in, when the session started and stopped, and how much data moved. Most small setups configure authentication first and add accounting when they want login history.

Why does radtest use the secret testing123?

Because the FreeRADIUS package ships with a built-in client entry for localhost whose secret is testing123. That secret is only for testing on the server itself. Every real device — switch, access point, VPN box — must get its own client entry in clients.conf with its own strong secret.

This guide is based on the Technical Anshu FreeRADIUS video • Stuck on any step? Ask in the video comments — you will get an answer there 🙏