RADIUS: authentication for networks, VPN, and Wi-Fi

Updated November 1, 2026

RADIUS is a veteran AAA protocol running over UDP/1812+1813 (auth+accounting). Use it for authenticating network equipment clients: Wi-Fi WPA2-Enterprise via EAP, VPN clients, and router/switch access. FreeRADIUS is the default open-source implementation.

Why RADIUS

When you have hundreds of network devices (switches, APs, VPN concentrators) and thousands of users, duplicating passwords on every device is not an option. You need centralized AAA:

  • Authentication: who this user is
  • Authorization: what they are allowed to do
  • Accounting: session tracking (start/stop, byte counters)

RADIUS (RFC 2865, 1997) is the long-standing standard for this. Despite its age and all of its successors (Diameter, RadSec), in 2026 it remains the dominant protocol for:

  • WPA2/WPA3-Enterprise Wi-Fi (instead of PSK)
  • 802.1X wired authentication on switch ports
  • VPN servers (StrongSwan, OpenVPN, WireGuard via wrapper)
  • TACACS+ alternative for CLI access on network hardware
  • Captive portal in hotel/airport Wi-Fi

Transport

  • UDP/1812: Authentication
  • UDP/1813: Accounting
  • (Legacy ports 1645/1646 are older and still occasionally seen)

RadSec (RADIUS over TCP/TLS, RFC 6614) exists for secure inter-org RADIUS; eduroam uses it, for example.

The actors

┌─────────┐         ┌──────────────┐         ┌──────────────┐
│ Client  │  ◄───►  │  NAS (Network │  ◄───► │ RADIUS server│
│ (laptop,│  EAP    │  Access Server│  RADIUS │ (FreeRADIUS, │
│  phone) │         │   = AP/switch)│         │  Cisco ISE)  │
└─────────┘         └──────────────┘         └──────────────┘
                                                    │
                                                    ▼
                                               backend store
                                               (LDAP/SQL/file)
  • Supplicant (client): a laptop or phone running an 802.1X supplicant (wpa_supplicant on Linux, built into Windows/macOS/iOS).
  • NAS (Network Access Server): a Wi-Fi AP or switch port. It does not authenticate the client itself; it forwards auth requests to RADIUS.
  • RADIUS server: validates credentials and returns Accept or Reject.

Basic message flow (PAP)

Client ────[username/password in EAPOL]───► NAS
NAS    ────[Access-Request UDP/1812]────► RADIUS
                                           │
                                           ├─ lookup in LDAP/SQL
                                           ▼
NAS    ◄───[Access-Accept or Reject]──── RADIUS
Client ◄────[granted/denied + VLAN/IP]──── NAS

In the Access-Request, a shared secret between the NAS and RADIUS encrypts the password attribute.

EAP: the flexible layer above RADIUS

RADIUS itself supports only basic auth methods (PAP/CHAP). For modern protocols (TLS, 802.1X), EAP (Extensible Authentication Protocol, RFC 3748) is used.

EAP is a message format that can tunnel any auth method:

EAP methodWhat it usesWhere it applies
EAP-TLSmutual TLS certsenterprise high-security, no passwords
PEAPserver cert + inner method (MSCHAPv2)typical Windows/AD environments
EAP-TTLSserver cert + inner (PAP/CHAP/MSCHAPv2)universal, works easily with LDAP backend
EAP-MSCHAPv2password only, vulnerablelegacy, avoid for new deployments
EAP-PWDpassword (PAKE)devices without a cert store (IoT)
EAP-AKASIM cardmobile carriers

EAP rides inside RADIUS attributes (EAP-Message). The NAS just tunnels it without understanding the content. All decryption happens on the RADIUS server.

FreeRADIUS: the open-source standard

FreeRADIUS is tier-0 open source; most corporate RADIUS deployments build on it. Its configuration is modular: each entity (auth method, backend, policy) is a separate module.

Files:

/etc/raddb/
  ├── radiusd.conf            # main config
  ├── clients.conf            # NAS devices with shared secrets
  ├── users                   # local user database (old style)
  ├── mods-available/         # all available modules (LDAP, SQL, EAP, ...)
  ├── mods-enabled/           # symlinks to enabled modules
  ├── sites-available/        # virtual servers
  └── sites-enabled/

Basic workflow:

  1. Register the NAS in clients.conf:
client wifi-ap-1 {
    ipaddr = 192.168.1.10
    secret = supersecret123
    shortname = ap-floor-1
}
  1. Configure the bind to LDAP/AD in mods-enabled/ldap:
ldap {
    server = ldaps://ad.example.com
    identity = cn=radius,ou=Service,dc=example,dc=com
    password = ...
    basedn = dc=example,dc=com
}
  1. Set the policy in sites-enabled/default:
authorize { ldap; eap }
authenticate { eap; ldap }

Always start with debug mode the first time:

freeradius -X        # all logs to stdout, shows every attribute

Wi-Fi WPA2-Enterprise (full picture)

A real-world scenario:

  1. A laptop connects to SSID corp-wifi (security: WPA2-Enterprise).
  2. The Wi-Fi AP initiates 802.1X auth and sends an EAP request.
  3. The laptop proposes PEAP with TLS inside.
  4. The AP tunnels EAP into a RADIUS Access-Request to the server.
  5. The RADIUS server establishes TLS with the laptop (through the AP), then verifies the username/password against LDAP via inner MSCHAPv2.
  6. RADIUS replies with Access-Accept and attributes:
Tunnel-Type = VLAN
Tunnel-Medium-Type = IEEE-802
Tunnel-Private-Group-Id = 100      ← VLAN ID
  1. The AP places the laptop in VLAN 100 and starts forwarding traffic.

WPA-PSK uses a shared password for everyone; that is the home version. WPA-Enterprise gives each user their own credentials, individual VLAN, and access policy.

Switch port security with 802.1X

A wired network can require authentication on every port, blocking the "plug in a cable and it just works" approach:

Cisco IOS example:
interface GigabitEthernet0/1
 switchport mode access
 authentication port-control auto
 dot1x pae authenticator
 dot1x timeout tx-period 5
!
aaa group server radius RADIUS
 server-private 10.0.0.5 key supersecret123
!
aaa authentication dot1x default group RADIUS

Linux supplicant:

apt install wpasupplicant
wpa_supplicant -D wired -i eth0 -c /etc/wpa_supplicant/eth0.conf

Network device admin (instead of TACACS+)

Switches and routers often use RADIUS for admin CLI login:

aaa authentication login default group RADIUS local
aaa authorization exec default group RADIUS

The downside compared to TACACS+ (Cisco proprietary, open-sourced in 2020): TACACS+ supports per-command authorization (you can block individual commands). RADIUS does not; it handles only enable vs. no-enable.

Accounting

Accounting runs in parallel with auth on UDP/1813:

Acct-Status-Type = Start    (session started)
Acct-Session-Id = ...
User-Name = alice
Framed-IP-Address = 10.0.0.42
...

Acct-Status-Type = Interim-Update    (every N min)
Acct-Input-Octets = 1234567
Acct-Output-Octets = 7654321

Acct-Status-Type = Stop
Acct-Session-Time = 3600

Accounting is used for billing (ISP, hotel Wi-Fi), forensics (who was logged in at the time of an incident), and capacity planning.

RADIUS vs LDAP vs Kerberos

These are often confused because they operate at different layers:

RADIUSLDAPkerberos
Purposenetwork AAAdirectory + authSSO for services
Where it livesnetwork hardware to AAAapplications to directoryapplications to KDC
TransportUDP/1812TCP/389,636TCP+UDP/88
Backendyes, usually LDAP/SQLits own backendown KDC

A common stack: RADIUS handles 802.1X authentication, queries LDAP in Active Directory, and then applications separately authenticate via Kerberos.

RADIUS security pitfalls

  • Shared secret: the password between NAS and RADIUS. A short one can be brute-forced. Use 16+ random characters.
  • Replay attacks: the RADIUS ID field is 8-bit, easy to guess. Use RadSec (TLS) or IPsec between NAS and RADIUS in production.
  • MSCHAPv2 is vulnerable (DES with 56-bit effective key strength). PEAP-MSCHAPv2 is protected by the outer TLS session, but if an attacker mimics the AP with a fake cert and the client does not validate it, the password is stolen. Always verify the server cert on the client.
  • MAC-bypass auth: in insecure setups RADIUS can grant access based on MAC address. MAC addresses are trivially spoofed. That is identification, not authentication.
  • CVE-2024-3596 BlastRADIUS: an attack on MD5-based authentication in RADIUS. Mitigation: always require Message-Authenticator and use RadSec.

When something goes wrong

  • Reject from server with no details: freeradius -X shows every attribute and the reason (often an LDAP bind failure).
  • NAS does not receive Access-Accept: UDP is being dropped, or the shared secret is wrong. Check packets with tcpdump -i any port 1812 -X.
  • EAP fails with Server certificate validation failed: the client does not trust the RADIUS server's cert. Push the root CA to all devices, or configure it in the EAP supplicant.
  • VLAN not assigned after Accept: RADIUS is not returning Tunnel-* attributes, or the switch is not parsing them. Run dot1x debug on the switch.
  • Accounting not recorded: the accounting port is not set on the NAS, or a firewall is blocking UDP/1813.
  • High auth latency: the backend (LDAP) is slow. freeradius -X shows where. Add caching or replicas.
  • Login OK but no enable mode: RADIUS returned Accept but without the Service-Type = Administrative-User attribute, so the switch grants only user mode.

Commands

  • freeradius -X: Start FreeRADIUS in debug mode, printing every request and decision with full attribute detail.
  • radtest alice secret123 192.168.1.10 0 sharedsecret: Test auth as a NAS emulator, a quick check that the server returns Accept or Reject.
  • radclient -x localhost auth sharedsecret <<< 'User-Name=alice,User-Password=s3cret': Send a direct request to the RADIUS server with arbitrary attributes for debugging.
  • tcpdump -i any -nn 'udp port 1812 or udp port 1813' -X: Capture RADIUS traffic with a hex dump to inspect packets in real time.
  • wpa_supplicant -D wired -i eth0 -c /etc/wpa_supplicant/eth0.conf: Run the Linux 802.1X supplicant on a wired port to authenticate against a switch.
  • ldapsearch -H ldaps://ad.example.com -D radius@example.com -w secret -b dc=example,dc=com 'sAMAccountName=alice': Verify that the RADIUS bind to Active Directory works before configuring the LDAP module.
  • echo 'User-Name=test,Cleartext-Password:=test' >> /etc/raddb/users: Add a minimal local user for testing without an LDAP or SQL backend.

See also