FreeRADIUS
An SSTP server can check logins against a RADIUS server instead of its own user list. This page describes the FreeRADIUS server that our MikroTik router, our SoftEther server and our Windows Server 2025 use, and what it adds: one user list for all of them, and, for Windows Server 2025, the one of them that sends EAP to it, PEAP, EAP-TTLS and certificate login with EAP-TLS.
The settings below were read from our server on 6 November 2026: FreeRADIUS 3.2.5 from the Ubuntu 24.04 packages, compared with the files the package installed. The results named here come from the test runs listed in Test results.
When you need it
- One user list for several SSTP servers. MikroTik, SoftEther and Windows can all ask the same RADIUS server.
- EAP methods the SSTP server lacks. MikroTik and SoftEther have no EAP of their own. Windows RRAS passes EAP to RADIUS unchanged, so with FreeRADIUS behind it the app can use PEAP, EAP-TTLS and EAP-TLS.
- Certificate login (EAP-TLS). With Windows' own NPS, EAP-TLS needs the server to be a member of an Active Directory domain. FreeRADIUS checks the client certificate against a CA file instead.
1. Install
apt-get install -y freeradius
The configuration lives in /etc/freeradius/3.0/. Keep a copy of each file before changing it.
2. Allow each SSTP server as a client
Each SSTP server that sends logins is a RADIUS client with a shared secret. Add one block per server at the end of clients.conf:
client sstp-mikrotik {
ipaddr = <MIKROTIK_IP>
secret = <RADIUS_SECRET>
}
client sstp-windows {
ipaddr = <WINDOWS_IP>
secret = <RADIUS_SECRET>
}
Our SoftEther server runs on the same host as FreeRADIUS and uses the localhost client that the package already has; set its secret too. Use a long random secret, for example the output of openssl rand -base64 24, and enter the same one on the SSTP server.
3. Users
Our server keeps its test users in the files module. MS-CHAPv2 needs the password in a form the server can compute with, so it is stored as Cleartext-Password. Add one line per user at the top of mods-config/files/authorize:
vpnuser Cleartext-Password := "<PASSWORD>"
This file is readable only by root and the freerad group. A production server would usually take its users from a database or a directory instead.
4. The EAP server certificate
With PEAP, EAP-TTLS and EAP-TLS the RADIUS server opens its own TLS session to the phone, inside PPP. The app checks that server's certificate: it must chain to a root the phone trusts, unless Allow Untrusted Certificate is on. The package's self-signed certificate does not, so our server uses its Let's Encrypt certificate. In mods-available/eap, in the tls-config tls-common section:
private_key_file = ${certdir}/srp-le-privkey.pem
certificate_file = ${certdir}/srp-le-fullchain.pem
Certbot's deploy hook on our server copies the renewed key and full chain to those two files in /etc/freeradius/3.0/certs/, readable by the freerad group, and restarts FreeRADIUS:
#!/bin/sh
# FreeRADIUS reads the EAP certificate from its own directory with group freerad
live=/etc/letsencrypt/live/<SERVER_HOST>
install -o root -g freerad -m 640 $live/fullchain.pem /etc/freeradius/3.0/certs/srp-le-fullchain.pem
install -o root -g freerad -m 640 $live/privkey.pem /etc/freeradius/3.0/certs/srp-le-privkey.pem
systemctl restart freeradius
The same section keeps the package's tls_min_version = "1.2" and tls_max_version = "1.2". The app offers TLS 1.3 for EAP by default and this server answers with TLS 1.2, which the app accepts.
5. Certificate login (EAP-TLS)
For EAP-TLS, FreeRADIUS accepts a client certificate only when it chains to the CA in ca_file. Our server points it at the test CA that issued our client certificates, instead of the system's list of public roots:
ca_file = ${certdir}/<your-client-ca>.pem
With that, a client certificate from that CA logged in, and one from another CA was refused. The app uses the client certificate and its private key from the .p12 or .pfx file imported into the profile; see Certificate login.
6. EAP methods
The package's eap module is used as it is. In it PEAP runs EAP-MSCHAPv2 inside, and EAP-TTLS takes PAP, CHAP and EAP-MSCHAPv2 inside. For EAP inside EAP-TTLS, the module first offers EAP-MD5 (default_eap_type = md5 in its ttls section); the app never answers EAP-MD5 and asks for EAP-MSCHAPv2 instead, which FreeRADIUS then uses. TEAP is commented out in this version's file, so a profile that offers only TEAP is refused. PEAP from FreeRADIUS sends no crypto binding, so a profile with Require Crypto Binding on does not connect to it; that switch is for Windows NPS.
7. Firewall
RADIUS uses UDP 1812 (authentication) and 1813 (accounting). Our server accepts these ports only from the SSTP servers' addresses and from itself. Allow your SSTP servers the same way in your firewall.
8. Start and check
freeradius -XC
systemctl restart freeradius
systemctl status freeradius --no-pager
freeradius -XC reads the whole configuration and ends with Configuration appears to be OK. To see one login step by step, stop the service and run freeradius -X in a terminal; each request ends with Access-Accept or Access-Reject.