How to Setup a Radius Server on Ubuntu Server 24.04​

0
31

Want to boost your network’s security? Need centralized authentication for your Wi-Fi or VPN? Meet your new best friend: the RADIUS server. It’s reliable, secure, and with Ubuntu Server 24.04, it’s easier than ever to set up. Let’s walk through the process step by step, and keep it fun while we learn!

🛠 What’s a RADIUS Server?

RADIUS stands for Remote Authentication Dial-In User Service. It helps you manage user logins. Instead of creating individual accounts on each device, RADIUS says, “Hold up, I got this!” and checks if users are legit all from one place.

You can use RADIUS to secure:

  • Wi-Fi networks
  • VPN access
  • Linux servers
  • Router logins

📦 Step 1: Install FreeRADIUS

FreeRADIUS is the most popular RADIUS server. It’s open source and flexible.

First, make sure your system’s packages are up to date:

sudo apt update && sudo apt upgrade

Now install FreeRADIUS and some helpful tools:

sudo apt install freeradius freeradius-utils

That’s it! You now have FreeRADIUS installed. 🎉

🗂 Step 2: Add a Test User

Let’s add a user to test our server. Open the users config file:

sudo nano /etc/freeradius/3.0/users

Scroll down and add this line:

alice Cleartext-Password := "supersecret"

Press Ctrl+O to save, and Ctrl+X to exit Nano. This user can now log in using RADIUS. How cool is that?

🔧 Step 3: Test the Server

Check if the server is running:

sudo systemctl status freeradius

If the service is inactive, start it:

sudo systemctl start freeradius

Now, let’s test our new user:

radtest alice supersecret localhost 0 testing123

If you see “Access-Accept” in the output, congrats! Your RADIUS server is working! 🎉

🔐 Step 4: Configure with a Client

Next, you need to add a client device like a Wi-Fi router or a VPN server.

Edit the clients.conf file:

sudo nano /etc/freeradius/3.0/clients.conf

Add something like this to the bottom:

client myrouter {
    ipaddr = 192.168.1.1
    secret = radsecret
}

Replace the IP with your client device’s IP address. Change the secret to something secure. This is like a password between RADIUS and the device.

🚀 Step 5: Restart and Celebrate

Time to give RADIUS a quick refresh:

sudo systemctl restart freeradius

🎉 Your RADIUS server is officially ready to accept connections!

🤔 Bonus Tips for Success

  • Use strong passwords: Avoid silly secrets like “1234”.
  • Keep backups: Config files are gold. Make copies.
  • Secure the server: Think firewalls and VPNs.

Also, the logs are super helpful. Check them here if you get stuck:

/var/log/freeradius/radius.log

📚 Wrapping Up

Setting up a RADIUS server might sound scary, but now you know it’s just a bunch of simple steps. With Ubuntu Server 24.04 and FreeRADIUS, you’ll soon feel like a networking ninja.

You’ve installed and configured the server, added a user, tested it, and connected a client. Go ahead, treat yourself to a cookie. You earned it! 🍪

happy admin, ubuntu setup, success, configuration complete[/ai-img>

Still curious? Dive deeper into advanced topics like LDAP integration or PEAP tunneling. But that’s an adventure for another day. 😉