Hands-on tutorial
Tutorials · Security
How to Set Up a RADIUS Server With FreeRADIUS for Wi-Fi and Switch Login
Install FreeRADIUS, add access points and switches as clients, authenticate users for WPA2/WPA3-Enterprise and 802.1X, and return VLANs, with secure secrets and logging.
Before you start
- A Linux server or container host on the management network
- Switches and access points that support RADIUS
- A user directory (local users to start, LDAP/AD later) and a server certificate for EAP
Step by step
Install FreeRADIUS
Install from your distribution's packages or run the official container. Keep it on a management VLAN that only network devices can reach.
apt install freeradius freeradius-utils systemctl enable --now freeradius
Add network devices as clients
Each access point, controller or switch that sends requests is a client with its own long, random shared secret.
# /etc/freeradius/3.0/clients.conf client core-sw1 { ipaddr = 10.0.99.2 secret = <long-random-secret> }
Install a proper certificate for EAP
For PEAP or EAP-TLS, replace the test certificates with one from your internal CA. Clients must be configured to validate it, or they can be tricked by fake access points.
Add users or connect the directory
Start with a few test users, then connect LDAP or Active Directory so staff use their normal accounts.
Return VLANs
Send the VLAN in the reply attributes so each user group lands in the right network.
Tunnel-Type = VLAN Tunnel-Medium-Type = IEEE-802 Tunnel-Private-Group-Id = 20
Test before enabling on devices
Use radtest or eapol_test to check authentication, then enable it on one SSID or switch port.
radtest alice 'Passw0rd!' 127.0.0.1 0 testing123Log and protect
Send logs to your SIEM, enable Message-Authenticator on requests and replies, and run two RADIUS servers for redundancy.
Commands are generic, industry-standard examples. Exact syntax and menu names vary by model and firmware; check your device's manual on the Documentation page.
Pro tips
- Never reuse the shared secret across devices.
- Keep a local admin account on switches in case RADIUS is unreachable.
- Patch FreeRADIUS promptly; see our BlastRADIUS guide.
FAQ
Frequently asked questions
PEAP or EAP-TLS?
EAP-TLS with device certificates is the strongest. PEAP with passwords is easier to start with, as long as clients validate the server certificate.
Can RADIUS also control switch admin logins?
Yes, though TACACS+ gives per-command authorisation and accounting for administrators.
Keep learning
Related guides
WPA3-Enterprise with RADIUS
Read more →Harden RADIUS against BlastRADIUS
Read more →What is a RADIUS server?
Read more →How to Enable 802.1X Port Authentication on Switches
Stop unknown devices from using your network ports: configure 802.1X with RADIUS and MAC-authentication bypass for printers and cameras.
Read more →How to Secure the Management of Switches, Routers and Access Points
A hardening checklist for every network device: strong credentials, SSH only, a management VLAN, access lists and logging.
Read more →How to Segment IoT and CCTV Devices From Your Main Network
Put cameras, smart TVs, sensors and building systems in their own VLANs so one compromised device cannot reach your business systems.
Read more →Stuck on a step?
Ask Navijin technical support or an authorised partner for help with your configuration.