Back
It's easy to set up a local RADIUS server with EZRADIUS local proxy

How to Set Up a Local RADIUS Server: The Easy Alternative to NPS and FreeRADIUS

Introduction - Why is a RADIUS Server Required for Network Authentication?

When you’re setting up your wired ethernet or Wi-Fi networks, you want to make sure that not anybody can just walk up and connect to your resources. While your ethernet jacks are usually behind locked doors and Wi-Fi networks can have a password, these protections are easily bypassed by tailgaters into your building or a leaked Wi-Fi password. This is where a RADIUS (Remote Authentication Dial-In User Service) server comes in, where you can implement strong 802.1X authentication that requires your devices to log in to your network before gaining access.

While this blog post won’t go in depth on how RADIUS works, you can check our previous blog post for a detailed explanation. This post will instead focus on the different ways to host a RADIUS server locally, including using EZRADIUS for a simple and efficient setup.

How Do Organizations Typically Host Their Own RADIUS Servers?

RADIUS server connecting to network device

If you Google “RADIUS servers”, you typically see the top two self-hostable solutions: Microsoft’s Network Policy Server (NPS) and FreeRADIUS. While both are popular options for hosting a RADIUS server locally, they come with their own complexities, limitations, and maintenance requirements.

NPS is a Windows Server-based solution that integrates tightly with Active Directory, making it a convenient choice for organizations already using Windows infrastructure. If you’re already running an on-premises Active Directory, NPS can be a straightforward option for implementing RADIUS authentication. However, it doesn’t support cloud-only Entra ID accounts without manual workarounds and “ghost accounts”, since NPS can only match against on-premises Active Directory accounts.

FreeRADIUS, on the other hand, is an open-source RADIUS server that runs on various operating systems. It’s a great option if you want to get your hands dirty and are comfortable with community-supported modules for Entra ID support, as FreeRADIUS doesn’t have built-in Entra ID support.

Both options require a certain level of technical expertise and ongoing maintenance, and they require multiple systems outside of the RADIUS server itself, such as ghost account syncing for NPS and community-supported OAuth modules for FreeRADIUS. It’s for this reason that a lot of organizations have looked for cloud-hosted solutions or hybrid solutions that don’t require managing all these additional components themselves.

Do I Even Need a Local RADIUS Server?

Cloud-hosted RADIUS server connecting to network device

If you’re looking for a RADIUS server that can authenticate your Entra ID users either through their username and password, or through certificate-based authentication, EZRADIUS by Keytos is a popular option that provides both a cloud-hosted solution as well as a free local deployment add-on for organizations looking for minimal latency and maximum availability without the need to manage complex infrastructure.

But before we get into how to set up an on-premises EZRADIUS service, it’s important to evaluate whether you truly need a local RADIUS server. For most organizations, a cloud-hosted RADIUS solution like EZRADIUS can cover 100% of your needs without the added complexity of managing local infrastructure. EZRADIUS was built from the ground up by ex-Microsoft engineers with latency and availability in mind, with:

  • 20+ regions worldwide to choose from, ensuring your global workforce has a RADIUS server nearby for low latency connections
  • 99.95% uptime enterprise-tier SLA to guarantee reliable access to your RADIUS services
  • Geo + zonal redundancy to ensure high availability and resilience against regional failures
  • RADIUS + RadSec Support for secure and reliable authentication over both traditional and encrypted channels
  • No infrastructure or servers to manage. We take care of all the hosting, patching, and maintenance for you

However, there are a few scenarios where a local RADIUS server might still be necessary, such as:

  • Remote locations with spotty internet connectivity, where relying on a cloud-hosted RADIUS server could lead to authentication failures.
  • Legacy systems that rely on older authentication protocols and cannot use RadSec for secure authentication.
  • Highly available environments that require additional redundancy and failover capabilities for critical authentication services.

In these cases it makes sense to deploy a local RADIUS server which proxies, caches, and handles authentication requests locally, ensuring continued access even when connectivity to the cloud-hosted RADIUS server is unreliable. This hybrid approach allows organizations to benefit from the reliability and scalability of a cloud-hosted RADIUS service while maintaining local control and redundancy for critical authentication scenarios.

How to Set Up a Local RADIUS Proxy with EZRADIUS

A local RADIUS proxy runs within your network and processes authentication requests locally. It syncs with your cloud RADIUS policies to ensure consistent authentication rules and policies across both local and cloud environments, but it can operate independently when connectivity to the cloud-hosted RADIUS server is unavailable.

Highly Available Cloud RADIUS with EZRADIUS

Prerequisites for Deploying a Local RADIUS Server

Before we get into the specific set up steps, let’s review the prerequisites and considerations for deploying a local RADIUS proxy with EZRADIUS. Since the local proxy runs as a Docker container, you’ll need a Linux server with the following specifications:

  • Operating System: Linux (Ubuntu 24.04 or later is recommended)
  • CPU: 2 cores minimum
  • RAM: 4 GB minimum
  • Software: Docker Engine (20.10 or later)

Docker on Windows is not currently supported due to issues with the IP address of the client not being correctly passed to the container.

On your network side, you’ll need:

  • Outbound Internet Access: The local RADIUS proxy needs to communicate with the EZRADIUS and the Entra ID cloud servers. Ensure that the server has outbound internet access on port 443 (HTTPS). Inbound access is not required.
  • Ports: Ensure that your network devices (like VPNs, Wi-Fi access points, and firewalls) can send RADIUS authentication requests to the local RADIUS proxy on UDP ports 1812 (authentication) and 1813 (accounting) for RADIUS and/or 2083 (RadSec). These do not need to be open to the internet, only between your devices and the local proxy.

Step 1: Create Your EZRADIUS Cloud RADIUS Profile

Your local EZRADIUS proxy container syncs with your EZRADIUS cloud network profiles to pull down its configuration. The first step is to create an EZRADIUS subscription and set up a cloud RADIUS network profile. The network profile will configure things like who can authenticate, which authentication methods are allowed, and the RADIUS clients that are permitted to communicate with the local proxy.

Visit the EZRADIUS getting started guide for a step-by-step walkthrough on creating your EZRADIUS subscription and setting up your cloud RADIUS network profile.

Create EZRADIUS Profile

Step 2: Create an Entra ID App Registration for Your Local Proxy

To allow your local RADIUS proxy to authenticate directly against Entra ID and Intune without a dependency on the EZRADIUS cloud service, you’ll register a separate Entra ID application for your proxy which will handle the authentication requests from the local proxy to Entra ID.

How to Register an EZRADIUS Local Proxy App Registration

Follow these steps to register your local proxy app in Entra ID

  1. Navigate to the Azure Portal.

  2. Go to Microsoft Entra ID > App registrations > + New registration.

    Create a new application registration in Entra ID for the EZRADIUS Local RADIUS Proxy
  3. Fill in the details for your application:

    • Name: EZRADIUS Local RADIUS Proxy
    • Supported account types: Single tenant only - <Your Organization Name>
    • Redirect URI: Leave this blank as the local proxy does not require a redirect URI.
  4. Click Register.

    Details for the Entra ID Application Registration for the EZRADIUS Local RADIUS Proxy

Collapses this section and completes the checkmark.

How to Add API Permissions For Entra ID Username and Password Validation

Now that you have a new Entra ID application for the local RADIUS proxy, we need to give it permission to authenticate users against Entra ID if you plan to use EAP-TTLS Entra ID username and password authentication.

  1. Within your newly created Entra ID application, navigate to API permissions and click on Add a permission.

    API Permissions for Entra ID Application
  2. From the tab bar, select APIs my organization uses and search for “EZRADIUS”. Select the EZRADIUS API from the search results.

    Select the EZRADIUS API for the Local RADIUS Proxy Application in Entra ID
  3. Select Delegated permissions, check the box for API.Access permission, and click Add permissions.

    Select API.Access permission for the Local RADIUS Proxy Application in Entra ID
  4. Click on the button for Grant admin consent for <Your Organization Name> and click Yes to grant the necessary permissions for the local RADIUS proxy to authenticate users against Entra ID.

    Grant admin consent for the Local RADIUS Proxy Application in Entra ID

Collapses this section and completes the checkmark.

How to Add API Permissions For Entra ID Group Checks and Intune Compliance Checks

For the local RADIUS proxy to renew its own client certificate, perform group membership checks, and perform Intune device compliance checks, it needs permissions to read directory data in Entra ID and to read the status of Intune devices.

  1. Within the Entra ID application you created for your local RADIUS proxy, navigate back to API permissions and click on Add a permission.

    API Permissions for Entra ID Application
  2. From the tab bar, select Microsoft APIs and then select Microsoft Graph.

    Select Microsoft Graph API for the Local RADIUS Proxy Application in Entra ID
  3. Select Application permissions since these permissions are for the application itself to read directory data and Intune device status, not on behalf of a signed-in user.

  4. Search for and select the following permissions:

    • Application.ReadWrite.OwnedBy Allows the local RADIUS proxy service to renew its own client certificate by updating the application registration in Entra ID with the new certificate information when the certificate is close to expiring.
    • DeviceManagementManagedDevices.Read.All Allows it to check the device status on your Intune devices when using the Intune Device compliance check.
    • Directory.Read.All Allows it to read all directory data in your Entra ID tenant for Group membership checks and to check if the device or user is still active.
  5. Click Add permissions to add these permissions to the local RADIUS proxy application.

  6. Click Grant admin consent for <Your Organization Name> and click Yes to grant the necessary permissions for the local RADIUS proxy to perform certificate renewal, group membership checks, and Intune device compliance checks.

  7. Your application should now look like this (EZRADIUS > API.Access will only show if you completed the previous section for Entra ID username and password authentication):

    API Permissions for Local RADIUS Proxy Application in Entra ID

Collapses this section and completes the checkmark.

Step 3 - How to Register a New Local RADIUS Proxy in EZRADIUS

Now that you have your Entra ID application set up for the local RADIUS proxy, you can proceed to register the new local RADIUS proxy in your EZRADIUS instance. This will allow you to download the configuration files needed to set up the local proxy container on your Linux machine.

Register a New Local RADIUS Proxy in EZRADIUS

Follow these steps to register your local RADIUS proxy in EZRADIUS

How to Register a New Local RADIUS Proxy in EZRADIUS

  1. In another tab, navigate to your EZRADIUS portal. If you’re unsure, you can find your portal endpoint at portal.ezradius.io.

  2. Navigate to the Local Server page.

    Local Server section in EZRADIUS for Cloud RADIUS
  3. Under New Server, enter the following details:

    • Friendly Name: A name to identify your local RADIUS proxy (e.g., Main Office RADIUS Proxy).

    • Entra ID Application ID: The Application (client) ID from the Entra ID application you created for the local RADIUS proxy. You can find this in the Overview page of your Entra ID application.

      Application (client) ID for Entra ID Application
  4. (optional) If you’d like to send service logs to Azure Application Insights:

    1. Create an Application Insights resource for your RADIUS proxy.

    2. Copy your Application Insights connection string from the Azure Portal.

    3. Paste your Application Insights connection string to the EZRADIUS local proxy registration form.

      Add Application Insights Connection String for Local RADIUS Proxy in EZRADIUS
  5. Under Select EZCA Certificate Authority, select the CA that you set up for your EZRADIUS client certificates. This is the CA that will issue the client certificate for your local RADIUS proxy to authenticate to the EZRADIUS cloud servers.

    Create Local RADIUS Proxy for Cloud RADIUS in EZRADIUS
  6. (optional) For additional configuration you can expand Advanced Settings to configure additional settings such as proxy caching (how long the proxy keeps the information) and certificate lifetime (don’t go too short on this because EZRADIUS will renew the certificate and if there are many certificates in an Entra ID application it breaks Entra ID).

    Note: The proxy will attempt to renew its own certificate once 75% of its lifetime has elapsed. The maximum certificate lifetime is determined by the maximum certificate validity period of you CA.

    Advanced Settings when creating a Local RADIUS Proxy for Cloud RADIUS in EZRADIUS
  7. Click Register Local Server

    Register Local RADIUS Proxy for Cloud RADIUS in EZRADIUS
  8. You will be prompted to download a zip file with the configuration for your local RADIUS proxy. This zip file contains the necessary files to set up and run the local RADIUS proxy container on your Linux machine, including:

    • The RADIUS proxy configuration file script.sh, which contains your Docker run command with all the necessary environment variables and settings pre-configured based on the information you provided during registration.
    • A .pem file with the certificate Note: This file has the private key and should be kept secure.
    • A .cer file with the public certificate.
  9. Extract the zip file and keep it in a secure location. You will need the contents of this file to set up your local RADIUS proxy registration and container on your Linux machine in the next steps.

Collapses this section and completes the checkmark.

How to Upload the Client Certificate to Your Entra ID Application

  1. Back in the Azure Portal, navigate back to your Entra ID Application Registration that you previously created.

  2. Click on Certificates & secrets. select the Certificates tab and then click on Upload certificate to upload the .cer file from the zip file you downloaded from EZRADIUS. This will allow your local RADIUS proxy to authenticate to Entra ID using the client certificate when it performs authentication requests and certificate renewal.

    Certificates and Secrets for Entra ID Application
  3. Upload the .cer file from the zip file you downloaded from EZRADIUS (not the .pem file).

    Upload client certificate for Entra ID Application for Local RADIUS Proxy
  4. Click Add to upload and associate the certificate with your Entra ID application.

Collapses this section and completes the checkmark.

Step 4 - How to Run Your Local RADIUS Proxy for Cloud RADIUS

Now that you have registered your local RADIUS proxy in EZRADIUS and set up the necessary Entra ID application, you can proceed to run the local RADIUS proxy container on your Linux machine using the configuration files you downloaded from EZRADIUS.

Options for Running Your Local RADIUS Proxy

Select your preferred method to run a Docker container

The following steps use the bash script that is included in the zip file you downloaded from EZRADIUS when you registered your local RADIUS proxy. This script will set up and run the Docker container for your local RADIUS proxy with all the necessary environment variables and configurations.

  1. SSH into or open a terminal window on the server where you want to deploy the RADIUS proxy.
  2. Create the directory where you want to deploy the RADIUS proxy. For this example we will use ~/Keytos/EZRADIUS/.
    mkdir -p ~/Keytos/EZRADIUS/
    
  3. From your local machine, upload the contents of the zip file you downloaded from EZRADIUS to the server. You can use scp or any other method you prefer. For example:
    scp path/to/your/downloaded/localserver_<GUID>.zip user@your-server-ip:/home/keytos-pi-0/Keytos/EZRADIUS/
    
  4. Back in the terminal on your server, navigate to the directory where you uploaded the zip file.
    cd ~/Keytos/EZRADIUS/
    
  5. Unzip the zip file.
    unzip localserver_<GUID>.zip
    
  6. Navigate into the unzipped directory.
    cd localserver_<GUID>/
    
  7. Make the script executable.
     chmod +x script.sh
    
  8. Run the script.
    ./script.sh
    
  9. The script will install and configure the RADIUS proxy.

Collapses this section and completes the checkmark.

If you prefer to manually run the Docker container without using the provided bash script, you can use the docker run command that is included in the script.sh file. This command is pre-configured with all the necessary environment variables and settings based on the information you provided during registration of your local RADIUS proxy in EZRADIUS.

docker run --detach --restart=always --pull=always \
	--publish 1812:1812/udp --publish 1813:1813/udp --publish 2083:2083/tcp --publish 8080:8080 \
	--env LocalServer__providerEndpointUrl=https://local.<region>.ezradius.io/ \
	--env LocalServer__certificateFilePath=/app/certificate.pem \
	--env AppDetails__ClientID=<YourClientID> \
	--env AppDetails__AppID=<YourAppID> \
	--env AppDetails__HomeTenant=<YourHomeTenant> \
    --env APPLICATIONINSIGHTS_CONNECTION_STRING="<YourApplicationInsightsConnectionString>" \
	--volume <YourCertificateFile>.pem:/app/certificate.pem:rw \
	keytos-eqgzasb8bufxa0cd.azurecr.io/ezradius/local-server:latest

Collapses this section and completes the checkmark.

If you prefer to use Docker Compose to manage your local RADIUS proxy container, you can create a docker-compose.yml file with the following content. Make sure to update the environment variables and volume mount path with the correct values for your setup.

name: ezradius

services:
  local-server:
    image: keytos-eqgzasb8bufxa0cd.azurecr.io/ezradius/local-server:latest
    restart: always
    pull_policy: always
    ports:
      - "1812:1812/udp" # RADIUS authentication
      - "1813:1813/udp" # RADIUS accounting
      - "2083:2083/tcp" # RADIUS Over TLS (RadSec)
      - "8080:8080/tcp" # Health checks and management API
    environment:
      LocalServer__providerEndpointUrl: "https://local.<region>.ezradius.io/"
      LocalServer__certificateFilePath: "/app/certificate.pem"
      AppDetails__ClientID: "<YourClientID>"
      AppDetails__AppID: "<YourAppID>"
      AppDetails__HomeTenant: "<YourHomeTenant>"
      APPLICATIONINSIGHTS_CONNECTION_STRING: "<YourApplicationInsightsConnectionString>"
    volumes:
      - type: bind
        source: ./data/setup/<YourCertificateFile>.pem
        target: /app/certificate.pem
        read_only: false

Collapses this section and completes the checkmark.

Your local RADIUS proxy should now be up and running.

Step 5 - Connect Your Network Devices to Your Local RADIUS Proxy

Now that your local RADIUS proxy is up and running, you need to configure your network devices to point to it for authentication requests. This typically involves updating the RADIUS server settings on your devices to use the IP address of your local RADIUS proxy. Visit our set of network device configuration guides for detailed instructions on how to configure various types of network devices.

View Network Device Configuration Guides

We also recommend setting your backup/secondary RADIUS server to point to the EZRADIUS cloud servers. This ensures that if your local RADIUS proxy becomes unavailable, authentication requests can still be processed by the cloud servers, maintaining uninterrupted access for your users.

Have Questions About Setting Up a Local RADIUS Server?

If you have any questions or need further assistance with setting up your local RADIUS server, feel free to reach out to our team of cloud PKI and identity experts who can provide guidance and support tailored to your specific network environment.

Schedule a Consultation with Our Experts