Managing users on 50 routers means changing passwords in 50 places. Someone leaves the company — 50 deletions. New hire — 50 accounts to create. Password policy change — 50 updates.
RADIUS and TACACS+ solve this. Users authenticate against a central server. Create once, authenticate everywhere. Revoke once, locked out everywhere.
At scale, central authentication is non-negotiable.
AAA Concepts
Authentication: Who are you? (username/password, keys) Authorization: What can you do? (privilege levels, commands) Accounting: What did you do? (logging, audit)
| Feature | RADIUS | TACACS+ |
|---|---|---|
| Port | UDP 1812/1813 | TCP 49 |
| Encryption | Password only | Full packet |
| Authorization | Limited | Per-command |
| Best for | Network access | Device management |
For router management, TACACS+ is generally preferred because it supports per-command authorization.
RADIUS Configuration
Basic RADIUS Setup
configure
# Add RADIUS serverset system login radius server 10.0.0.100 key "RadiusSecretKey123"set system login radius server 10.0.0.100 port 1812
# Optional: Set timeout and retriesset system login radius server 10.0.0.100 timeout 3
# Enable RADIUS authenticationset system login radius source-address 192.168.1.1
commitMultiple RADIUS Servers
# Primary serverset system login radius server 10.0.0.100 key "RadiusKey"set system login radius server 10.0.0.100 priority 1
# Backup serverset system login radius server 10.0.0.101 key "RadiusKey"set system login radius server 10.0.0.101 priority 2
# Third serverset system login radius server 10.0.0.102 key "RadiusKey"set system login radius server 10.0.0.102 priority 3
# VyOS tries servers in priority orderRADIUS with Local Fallback
# If RADIUS fails, fall back to local accounts# Always keep at least one local admin account!
set system login user local-admin full-name "Emergency Local Admin"set system login user local-admin authentication public-keys emergency key "..."set system login user local-admin authentication public-keys emergency type ssh-ed25519
# Local accounts are tried after RADIUS failsTACACS+ Configuration
Basic TACACS+ Setup
configure
# Add TACACS+ serverset system login tacacs server 10.0.0.100 key "TacacsSecretKey456"set system login tacacs server 10.0.0.100 port 49
# Set source addressset system login tacacs source-address 192.168.1.1
commitMultiple TACACS+ Servers
# Primaryset system login tacacs server 10.0.0.100 key "TacacsKey"set system login tacacs server 10.0.0.100 priority 1
# Backupset system login tacacs server 10.0.0.101 key "TacacsKey"set system login tacacs server 10.0.0.101 priority 2
commitTACACS+ Timeout
# Adjust timeout (default is usually fine)set system login tacacs server 10.0.0.100 timeout 5FreeRADIUS Server Setup
Install FreeRADIUS (Ubuntu/Debian)
apt updateapt install freeradius freeradius-utilsConfigure Client (VyOS Router)
client vyos-router { ipaddr = 192.168.1.1 secret = RadiusSecretKey123 shortname = vyos-main}Configure Users
# Admin useradmin-user Cleartext-Password := "AdminPassword123" Service-Type = Administrative-User, Cisco-AVPair = "shell:priv-lvl=15"
# Operator useroperator-user Cleartext-Password := "OperatorPassword456" Service-Type = NAS-Prompt-User, Cisco-AVPair = "shell:priv-lvl=1"Start FreeRADIUS
# Test configurationfreeradius -X # Debug mode
# Start servicesystemctl enable freeradiussystemctl start freeradius
# Test authenticationradtest admin-user AdminPassword123 localhost 0 testing123TACACS+ Server Setup (tac_plus)
Install tac_plus
apt install tacacs+Configure tac_plus
key = "TacacsSecretKey456"
accounting file = /var/log/tac_plus.acct
user = admin-user { member = admins login = cleartext "AdminPassword123"}
user = operator-user { member = operators login = cleartext "OperatorPassword456"}
group = admins { default service = permit service = exec { priv-lvl = 15 }}
group = operators { default service = deny service = exec { priv-lvl = 1 } cmd = show { permit .* } cmd = ping { permit .* } cmd = traceroute { permit .* }}Start tac_plus
systemctl enable tacacs+systemctl start tacacs+VyOS User Levels via AAA
RADIUS Attributes for VyOS
VyOS uses standard RADIUS attributes. To set privilege level:
# In FreeRADIUS users fileadmin-user Cleartext-Password := "password" Service-Type = Administrative-User# Maps to admin level
operator-user Cleartext-Password := "password" Service-Type = NAS-Prompt-User# Maps to operator levelTACACS+ Privilege Levels
# In tac_plus.confservice = exec { priv-lvl = 15 # Admin access}
service = exec { priv-lvl = 1 # Operator access}Testing Authentication
Test from VyOS
# Try to SSH with RADIUS/TACACS userssh admin-user@vyos-router
# Check logsshow log | grep -i radiusshow log | grep -i tacacsshow log | grep -i authTest from Server
# RADIUS testradtest admin-user AdminPassword123 localhost 0 testing123
# TACACS+ test (requires test tool)# Connect to VyOS and try loginDebug Authentication Issues
# On VyOS, check logsshow log | grep -i pamshow log | grep -i auth
# On RADIUS server (debug mode)freeradius -X
# Common issues:# - Wrong shared secret# - Firewall blocking ports# - Source address mismatchAccounting Configuration
RADIUS Accounting
# RADIUS accounting sends session start/stop records# Usually configured on RADIUS server side
# Check accounting logs on servercat /var/log/radius/radacct/*/detail-*TACACS+ Accounting
# tac_plus logs commands# Accounting file location in tac_plus.conf:accounting file = /var/log/tac_plus.acct
# View accounting logtail -f /var/log/tac_plus.acctHigh Availability Setup
Primary/Backup with Health Check
# Configure multiple serversset system login radius server 10.0.0.100 priority 1set system login radius server 10.0.0.101 priority 2
# VyOS automatically fails over if primary unavailableGeographic Distribution
# Datacenter 1set system login radius server 10.1.0.100 priority 1
# Datacenter 2set system login radius server 10.2.0.100 priority 2
# Local cache doesn't exist - ensure server availabilityLocal Fallback (Critical)
# ALWAYS keep local emergency accountset system login user emergency-admin authentication public-keys key "..."set system login user emergency-admin level admin
# If ALL RADIUS/TACACS servers fail, local accounts workIntegration with LDAP/AD
RADIUS/TACACS+ can proxy to LDAP/Active Directory:
FreeRADIUS with LDAP
ldap { server = 'ldap.example.com' port = 389 identity = 'cn=radius,dc=example,dc=com' password = ldap_password base_dn = 'dc=example,dc=com'
user { base_dn = "ou=users,${..base_dn}" filter = "(uid=%{%{Stripped-User-Name}:-%{User-Name}})" }}Group-Based Access
# Map LDAP groups to VyOS levels# In FreeRADIUS:
DEFAULT Ldap-Group == "network-admins" Service-Type = Administrative-User
DEFAULT Ldap-Group == "network-operators" Service-Type = NAS-Prompt-UserSecurity Best Practices
Secure Shared Secrets
# Use strong secrets (32+ characters)# Different secret per device (ideally)# Store secrets in vault, not text filesNetwork Security
# TACACS+ portset firewall ipv4 name MGMT-OUT rule 100 action acceptset firewall ipv4 name MGMT-OUT rule 100 destination port 49set firewall ipv4 name MGMT-OUT rule 100 destination address 10.0.0.100set firewall ipv4 name MGMT-OUT rule 100 protocol tcp
# RADIUS portsset firewall ipv4 name MGMT-OUT rule 110 action acceptset firewall ipv4 name MGMT-OUT rule 110 destination port 1812-1813set firewall ipv4 name MGMT-OUT rule 110 destination address 10.0.0.100set firewall ipv4 name MGMT-OUT rule 110 protocol udpEncrypt Traffic
# TACACS+ encrypts full packet (preferred)# RADIUS only encrypts password (use with caution over untrusted networks)
# Consider:# - VPN between router and AAA server# - Dedicated management network# - IPsec protected linksTroubleshooting
Authentication Fails
# 1. Verify connectivityping 10.0.0.100
# 2. Check portsnc -zv 10.0.0.100 49 # TACACS+nc -zvu 10.0.0.100 1812 # RADIUS
# 3. Check VyOS logsshow log | grep -i auth
# 4. Check server logs# RADIUS: /var/log/freeradius/radius.log# TACACS+: /var/log/tac_plus.log
# 5. Test locally on serverradtest user pass localhost 0 testing123Server Unreachable
# Check source address configurationshow configuration commands | grep source-address
# Verify routingshow ip route 10.0.0.100
# Check firewall rulesshow firewallThe Lesson
At scale, central authentication is non-negotiable.
With local accounts:
- Employee leaves → update 50 routers
- Password breach → rotate on 50 routers
- New hire → create on 50 routers
- Audit → check 50 routers
With central AAA:
- Employee leaves → disable one account
- Password breach → one place to update
- New hire → one account creation
- Audit → one central log
The setup takes a few hours. The ongoing management saves hundreds of hours per year.
Requirements:
- Redundancy: Multiple AAA servers
- Fallback: Local emergency account always
- Logging: Central accounting for audit
- Security: Encrypted protocols, strong secrets
Don’t run production network devices with only local accounts. Central authentication is infrastructure, not luxury.