This guide adds a phone approval to a VPN that authenticates over RADIUS. The Notakey Authentication Proxy (auth-proxy) sits between your VPN gateway and your RADIUS server. It sends the password check to the RADIUS server as before, asks the user on the phone, and returns Access-Accept to the VPN only when both succeed.
The guide is written for version 2 of the proxy, which appliances have
received with ntk sys update since November 2026. We ran the commands
below on a lab appliance and with the container from Docker Hub. The outputs
are from those runs, shortened and with our names and addresses replaced. If you run
version 1 today, read
Upgrade the Authentication Proxy to version 2
first: the update keeps your settings.
How it works
VPN gateway ──RADIUS──▶ Notakey auth-proxy ──RADIUS──▶ your RADIUS server
│
└──▶ approval request ──▶ user's phone
- The user dials the VPN with their username and password.
- The gateway sends the RADIUS request to the proxy, not to your RADIUS server.
- The proxy takes requests only from the gateways on its list. A packet from any other address is dropped unread.
- The proxy sends the password check to the RADIUS server. If the server rejects the password, the login is rejected and nobody is asked.
- If the password is good, the proxy sends an approval request to the user’s phone and holds the RADIUS exchange open while the user answers.
- Approve → Access-Accept goes back to the VPN. Deny or no answer in time → Access-Reject.
Two consequences shape the rest of this guide:
- The gateway has to wait as long as a person needs. Most RADIUS clients give up after a few seconds, because a password check answers at once. Here somebody has to take out a phone. While the gateway repeats its request, the user still gets one request on the phone, not one for each repeat.
- Packets are signed. The proxy checks the Message-Authenticator attribute in requests and in the replies of the RADIUS server, and puts it into its own replies. A gateway or a server that does not sign gets a setting of its own, described below.
Requirements
- A Notakey Authentication Server, version 5.2.2 or later: the free cloud tier at signup.notakey.com or the on-premise appliance
- A RADIUS server that checks the passwords (or Notakey’s RADIUS plugin; see step 3)
- A VPN that authenticates against RADIUS, and the address its requests come from
- The same username in the Notakey service, in RADIUS, and in the VPN (the proxy uses it to find the user’s phone)
Step 1 — Create the VPN service
In the Notakey dashboard, create a service (application) for the VPN, onboard the users’ phones, and copy the service’s Access ID, the UUID that goes into the proxy configuration below.
Step 2 — Configure the proxy
On the appliance
The appliance includes the proxy. With management tool 5.0.91 or later
(ntk sys update brings it), one JSON document holds the settings:
ntk cfg setc :ap '{
"vpn_port_in": "1812",
"vpn_access_id": "c468f008-485b-4e1c-b11c-aad9672fbae1",
"vpn_message_ttl": "30",
"message_title": "VPN authentication",
"message_description": "Allow {user} to connect to the VPN? Gateway: {gateway}. From: {address}.",
"clients": [
{ "name": "vpn-gw", "address": "192.0.2.10", "secret": "<secret of the gateway>" }
],
"servers": [
{ "name": "radius-1", "address": "192.0.2.50", "secret": "<secret of the RADIUS server>" }
]
}' --json-input
Check the settings, then start the proxy:
ntk ap validate
ntk ap start
ntk ap validate ends with a line like this one when everything is in
order:
valid, 1 client(s), 1 server(s), listen 0.0.0.0:1812, Notakey API http://dashboard:5000/api/, accounting off
When the authentication server runs on the same appliance, the proxy reaches
it inside the appliance, and ntk ap validate adds a warning that the API
address is plain HTTP. That is expected there. ntk ap start then creates
the API credentials of the proxy by itself:
=> Starting new Authentication proxy instance
creating API client "auth-proxy ntk-node" (977bdc63-5322-4fea-b14e-6173923af877)
service ID: c468f008-485b-4e1c-b11c-aad9672fbae1
RADIUS listen port: 1812
RADIUS upstream: 192.0.2.50:1812
gateways: vpn-gw (192.0.2.10)
auth timeout: 30 (seconds)
image: appliance.local/naa/auth-proxy:2.0.0
started a8e9e003b3c6
What each setting means:
| Setting | Meaning |
|---|---|
vpn_port_in |
UDP port the proxy listens on for the requests of your gateways |
vpn_access_id |
The Access ID of the service from step 1 |
vpn_message_ttl |
Seconds the user has to answer, 5 to 300 |
message_title / message_description |
What the user sees on the phone: {user}, {gateway} and {address} are filled in for each login |
clients |
Your gateways: a name, the address the requests come from (or a network), and a secret for each |
servers |
The RADIUS servers that check the password, in order of preference: name, address, secret |
{address} is the address the gateway reports for the user
(Calling-Station-Id). Not every gateway reports one; the text then says
unknown.
If a gateway does not sign its requests, the proxy does not answer it, and the log names it:
docker logs --since 10m auth-proxy 2>&1 | grep message_authenticator_missing
Turn Message-Authenticator on at the gateway. Where the gateway cannot send
it, add "requireMessageAuthenticator": false to its entry in clients.
The proxy manual
has a table of what we saw with four gateways in our lab.
If the RADIUS server does not sign its replies, the log has
server_reply_no_message_authenticator and the login gets no answer. Update
the server so that it signs. Where it cannot, add
"requireMessageAuthenticator": false to its entry in servers. In our lab
FreeRADIUS 3.2 signed its replies and Notakey’s RADIUS plugin did not, so
the plugin needed that setting.
After a change, ntk ap validate and ntk ap restart apply it. The restart
checks the settings before it stops the running proxy.
Anywhere else: the container
With a cloud-hosted Notakey server, or when the proxy should run next to the
RADIUS server and not on the appliance, run it as a container in your own
network. The image is public on Docker Hub as notakey/authproxy, for amd64
and arm64. Name the version: the tag latest still points to version 1.
The proxy calls the Notakey server with API credentials of its own. In the
dashboard, open Access credentials and create a credential with the
scopes urn:notakey:auth and urn:notakey:user. You receive a client ID
and a client secret.
Write the configuration into a file named authproxy.json:
{
"clients": [
{
"name": "vpn-gw",
"address": "192.0.2.10",
"secret": "<secret of the gateway>"
}
],
"passwordCheck": {
"servers": [
{
"name": "radius-1",
"address": "192.0.2.50",
"secret": "<secret of the RADIUS server>"
}
]
},
"notakey": {
"url": "https://2fa.example.com/api",
"serviceId": "c468f008-485b-4e1c-b11c-aad9672fbae1",
"clientId": "c1234567-d123-e123-f123-a12345678901",
"clientSecret": "<secret of the API client>",
"messageTitle": "VPN authentication",
"messageDescription": "Allow {user} to connect to the VPN? Gateway: {gateway}. From: {address}."
},
"logins": { "timeoutSeconds": 30 }
}
Check the file, then the way to the Notakey API and to the RADIUS server, and start the container:
docker run --rm -v "$PWD/authproxy.json:/etc/notakey/authproxy.json:ro" \
notakey/authproxy:2.0.0 --check-config
docker run --rm -v "$PWD/authproxy.json:/etc/notakey/authproxy.json:ro" \
notakey/authproxy:2.0.0 --validate
docker run -d --name auth-proxy --restart unless-stopped \
--read-only --cap-drop ALL --security-opt no-new-privileges:true \
-v "$PWD/authproxy.json:/etc/notakey/authproxy.json:ro" \
-p 1812:1812/udp \
notakey/authproxy:2.0.0
A file that is in order gives this line:
/etc/notakey/authproxy.json: valid, 1 client(s), 1 server(s), listen 0.0.0.0:1812, Notakey API https://2fa.example.com/api/, accounting off
Three things to know:
- The process in the container runs as the user with the id 1654, not as
root. It has to be able to read the file:
chown 1654 authproxy.json, and keep the file closed to other users, because it holds the secrets. - The proxy knows a gateway by the source address of its packets. On a Linux
host with Docker’s usual bridge network a published port keeps that
address. Docker Desktop replaces it; use
--network hostwhere that happens. - The container has no shell. What the proxy has to say is in
docker logs auth-proxy.
On 64-bit Windows the same program runs as a service. The package is a
zip file on the downloads page. It has a script that installs
the service, and the service reads the same authproxy.json as the
container. The proxy manual
has the steps and every setting.
Step 3 — No RADIUS server yet? Use ours
If you do not run RADIUS yet, you do not need to build one for this:
- Notakey RADIUS plugin. The appliance has a RADIUS service plugin
(FreeRADIUS-based). It accepts one global password, or a short list of
per-user passwords kept in the plugin’s own configuration, so there is no
RADIUS user database to build; the user is verified by the phone approval.
It does not check the users’ directory passwords; if you need that, use
Microsoft NPS or another RADIUS server connected to your directory. Setup
is in our knowledge-base article
RADIUS service plugin (no user configuration needed).
On the appliance its address for the proxy is
radius. In our lab its entry inserversneeded"requireMessageAuthenticator": false, as said above. - MikroTik User Manager. If your VPN ends on a MikroTik, its User Manager package can be the RADIUS server behind the proxy. We have not run it behind version 2 of the proxy yet.
- Any corporate RADIUS server you already have (FreeRADIUS, Microsoft NPS and similar) stays as it is. It gets one new RADIUS client: the proxy.
Step 4 — Point your VPN at the proxy
Change the RADIUS client settings of the VPN gateway: the server address is
now the proxy, not the RADIUS server, and the secret is the one you gave
this gateway in clients. Then raise the timeout.
On a MikroTik, that looks like this:
/radius
add service=ppp address=<proxy-address> secret=<secret of the gateway> timeout=30s
/ppp aaa
set use-radius=yes
The timeout=30s matters. In our lab RouterOS 7.25 waited about a
second and sent its request three times by default. That is enough for a
password check, but far too short for a person with a phone. Set the timeout to
the time the user has (vpn_message_ttl, 30 seconds here), or logins fail
before the user has reached for the phone. The same rule applies to the
RADIUS client of any other vendor.
Test it
Dial the VPN. The password check passes, and the request arrives on the phone, lock screen included, so the user does not need to have the app open:

Opening it shows the full request: who is logging in and from which IP address, with a countdown while the proxy holds the RADIUS exchange open:

The connection completes only after Approve. This screen is what the whole setup is for: a user who gets this request while not dialing the VPN is looking at someone else using their password, from an address they can see. One tap on Deny stops the login and leaves a record of it.
If something does not work:
- Logins time out although the user approves quickly. Check the RADIUS timeout of the gateway first. It is the most common mistake in this setup.
- The gateway gets no answer at all. Its address is not in
clients, it does not sign its requests, or its secret differs. Thecountersline in the log of the proxy says which; the upgrade article lists what to look for.
Related guides
- Palo Alto GlobalProtect 2FA over RADIUS: the same proxy with the appliance’s RADIUS plugin, no separate RADIUS server
- MikroTik router login 2FA: the same proxy, pointed at the router’s own WinBox/SSH login
- Linux SSH 2FA with pam_radius: the same proxy protecting SSH, sudo and su
- MikroTik VPN 2FA — the complete script-based setup: a single-router alternative with no RADIUS anywhere
- Windows Credential Provider for Remote Desktop