Your values Fill in your own to see them in every example
The Gateway identity on the VPN network’s page in the hub, or its Gateway when no identity is set.
That doesn’t look right yet. For example: vpn.example.com
One of the Office networks on the VPN network’s page in the hub.
That doesn’t look right yet. For example: 10.20.0.0/16
The Server, or Primary server, the hub shows when you register your RADIUS server at a site.
That doesn’t look right yet. For example: 203.0.113.10
RADIUS shared secret stays a marked placeholder here, never filled in: the hub gives you secrets, and only your server should hold them.
Saved in this browser only, for every page of these docs. Nothing you type leaves this page.
strongSwan’s eap-radius plugin passes each connection’s EAP conversation to
a RADIUS server without taking part in it. With Trustaige RADIUS as that
server, every managed device signs in to the VPN with its Trustaige
certificate, and Trustaige decides each connection by the device, its owner,
its posture and your policies. The same plugin takes Trustaige’s
Disconnect-Requests, so a device that loses its standing is off the VPN within
seconds.
Read Connect managed devices to your VPN gateway first
for the hub’s side: the VPN network, the one proposal and the gateway’s
certificate. Paths below are the package defaults on Linux: /etc/swanctl for
connections and credentials, /etc/strongswan.d and /etc/strongswan.conf for
the daemon.
Before you start
| You need | Why |
|---|---|
strongSwan 6 with swanctl and the charon-systemd or charon daemon | The configuration below is swanctl.conf’s. |
The eap-radius and eap-identity plugins | On Debian and Ubuntu they come in libcharon-extra-plugins. |
| A certificate for the gateway, with its private key | Devices check it before they sign in (see the gateway’s certificate). |
| A VPN network in the hub, served at a site, with the gateway registered there | The hub gives you the RADIUS servers, the port and the shared secret. |
| UDP 500 and 4500 open to the gateway; UDP 1812 and 1813 out to Trustaige | IKE and NAT traversal in; RADIUS and accounting out. |
In Trustaige
-
Add the VPN network with Server set to Trustaige RADIUS, and serve it at the site, as the overview describes.
-
On the site’s page, under Access points, choose Add access point, then A VPN gateway and strongSwan. Enter the Public address the gateway’s RADIUS requests come from.
-
Turn on Takes disconnects: strongSwan ends a tunnel on a Disconnect-Request once
daeis on, below. -
Choose Register gateway, and copy the Server (or Primary server and Secondary server), the Port and the shared secret.
The RADIUS plugin
Give eap-radius Trustaige’s servers, accounting and the dynamic
authorization listener. Put it in /etc/strongswan.d/charon/eap-radius.conf,
replacing that file’s contents, or in /etc/strongswan.conf:
eap-radius {
load = yes
accounting = yes
accounting_send_class = yes
servers {
trustaige1 {
address = <your-radius-server>
port = 1812
acct_port = 1813
secret = <your-radius-secret>
nas_identifier = head-office-vpn
}
}
dae {
enable = yes
listen = 0.0.0.0
port = 3799
secret = <your-radius-secret>
}
}
- Set
portto the hub’s Port, andacct_portto the port after it. If the hub showed a secondary server, copytrustaige1astrustaige2with that address. accounting = yessends Accounting-Start and Accounting-Stop for every tunnel. Trustaige shows the session under Connected now, and can disconnect only a session it saw in accounting.accounting_send_class = yesreturns theClassfrom Trustaige’s Access-Accept in accounting. It ties the session to the device that signed in; without it, the session appears but can’t be disconnected by device.daetakes Disconnect-Requests, signed with the same shared secret, on the port the site’s page shows beside the gateway (Disconnects on UDP 3799). strongSwan ends every tunnel whose EAP identity matches the request’sUser-Name, which Trustaige copies from the gateway’s own accounting.- Leave
class_groupoff. Trustaige’sClassnames the connection, not a group.
Allow UDP 3799 in to the gateway only from the addresses the hub lists when you choose Disconnects on UDP 3799.
eap-radius {
load = yes
accounting = yes
accounting_send_class = yes
servers {
trustaige1 {
address = <your-radius-server>
port = 1812
acct_port = 1813
secret = <your-radius-secret>
nas_identifier = head-office-vpn
}
}
dae {
enable = yes
listen = 0.0.0.0
port = 3799
secret = <your-radius-secret>
}
}The connection
connections {
trustaige-vpn {
version = 2
proposals = aes256-sha256-ecp256
rekey_time = 8h
pools = trustaige-vpn
send_cert = always
local {
auth = pubkey
certs = gateway.pem
id = <your-vpn-gateway>
}
remote {
auth = eap-radius
eap_id = %any
}
children {
trustaige-vpn {
local_ts = <your-office-network>
esp_proposals = aes256gcm16-ecp256
rekey_time = 1h
}
}
}
}
pools {
trustaige-vpn {
addrs = 10.99.0.0/24
dns = 10.20.0.53
}
}
proposalsandesp_proposalsare the one proposal.swanctl.confuses exactly the proposals listed, and adds strongSwan’s defaults only whendefaultis in the list, so nothing else is offered. The!that marks a strict proposal belongs to the olderipsec.confand has no place here.send_cert = alwayssends the gateway’s certificate unasked. Apple devices don’t ask for it, and strongSwan otherwise sends it only when asked.local.certsis the gateway’s certificate in/etc/swanctl/x509/; its key goes in/etc/swanctl/private/, and any intermediate certificates in/etc/swanctl/x509ca/.local.idis the identity devices expect, the Gateway identity on the VPN network’s page.remote.auth = eap-radiuspasses the EAP conversation to Trustaige.eap_id = %anyasks the device for its EAP identity first.local_tsis the VPN’s Office networks, separated by commas, exactly as the hub lists them. Apple devices route only what the gateway offers here. On a VPN that carries All traffic, setlocal_ts = 0.0.0.0/0, ::/0.poolshands each device an address. Choose a range your office routes back to the gateway, and the DNS servers you entered in the hub.
Load everything, then check that the connection and the pool are there:
sudo systemctl restart strongswan
sudo swanctl --load-all
sudo swanctl --list-conns
When disconnects can’t reach the gateway
If the gateway is behind NAT that Trustaige’s Disconnect-Requests can’t cross,
turn Takes disconnects off in the hub instead and choose an interval under
Connections sign in again every. Trustaige then caps each connection’s
Session-Timeout at that interval, and strongSwan enforces it by
re-authentication: the device signs in again, and Trustaige decides it again.
Keep accounting = yes, so sessions still appear under Connected now.
connections {
trustaige-vpn {
version = 2
proposals = aes256-sha256-ecp256
rekey_time = 8h
pools = trustaige-vpn
send_cert = always
local {
auth = pubkey
certs = gateway.pem
id = <your-vpn-gateway>
}
remote {
auth = eap-radius
eap_id = %any
}
children {
trustaige-vpn {
local_ts = <your-office-network>
esp_proposals = aes256gcm16-ecp256
rekey_time = 1h
}
}
}
}
pools {
trustaige-vpn {
addrs = 10.99.0.0/24
dns = 10.20.0.53
}
}sudo systemctl restart strongswan
sudo swanctl --load-all
sudo swanctl --list-connsCheck it works
- Watch the daemon’s log on the gateway:
sudo swanctl --log. - Connect from a managed device that has received the VPN. The log shows the
IKE proposal chosen,
sending RADIUS Access-RequestandRADIUS authentication of '…' successful, then the tunnel’s traffic selectors. sudo swanctl --list-saslists the tunnel. In the hub, the site’s Recent joins and the network’s Recent connections show the decision, and Connected now shows the session.- Block the device in the hub. The log shows the Disconnect-Request and the tunnel closing; the hub records the disconnect as delivered.
The gateway checks the certificate
For a VPN whose Server is The gateway checks the certificate, strongSwan authenticates the device certificate itself and asks Trustaige for its status over OCSP. Nothing is registered at a site; the network’s Your VPN gateway page has what strongSwan needs. See A gateway that checks the certificate for what changes for devices.
-
On the network’s page, open Your VPN gateway, then Trust bundle, revocation and gateway guides, and download the trust bundle.
-
Put each authority in its own file in
/etc/swanctl/x509ca/:cd /etc/swanctl/x509ca sudo awk '/BEGIN CERTIFICATE/{n++} n{print > ("trustaige-network-" n ".pem")}' \ ~/acme-network-intermediates.pemReplace the path with the file you downloaded. During a rollover the bundle holds two authorities; download it again and repeat when the hub lists a new one.
-
Check that the
revocationandcurlplugins are loaded:sudo swanctl --statslists them.revocationreads the OCSP address from each device certificate, andcurlfetches it over HTTPS, the only scheme Trustaige’s status addresses answer on. -
Change the connection’s
remotesection:remote { auth = pubkey cacerts = trustaige-network-1.pem, trustaige-network-2.pem revocation = strict }cacertsadmits only certificates your organization’s authorities issued. It doesn’t admit another organization’s devices, as the platform root alone would.revocation = strictrefuses a device whose status can’t be fetched, as well as one Trustaige reports revoked or on hold.
-
Remove the
eap-radiusservers if nothing else uses them, then reload withsudo swanctl --load-all.
strongSwan checks status when the tunnel is set up and at each
re-authentication. A device that loses its standing is refused at its next
connection; one already connected stays until then. To bound that, set
reauth_time on the connection, for example reauth_time = 1h, in place of
rekey_time.
Troubleshooting
The log says “no acceptable proposal found” or “received proposals … configured proposals …”
The device and the gateway disagree on the suite. Check proposals and
esp_proposals letter for letter, including ecp256 in esp_proposals, which
is the tunnel’s PFS group.
The log says “RADIUS server is not responding”
Nothing came back from Trustaige. Check that outbound UDP to the hub’s port is allowed, that the gateway is registered at the address its requests come from, and the shared secret: Trustaige drops a request it can’t authenticate without answering.
The log says “RADIUS authentication of '…' failed”
Trustaige refused the device. The site’s Recent joins or Devices › Networks › Activity gives the reason, such as a device that isn’t assigned to the VPN or a certificate that was revoked.
The device fails right after IKE_SA_INIT, with no RADIUS request in the log
The device didn’t accept the gateway’s certificate, or the identity it asked
for isn’t local.id. Check the certificate’s subject alternative names and
serverAuth, and that /etc/swanctl/x509ca/ holds its intermediates.
The hub shows a Disconnect-Request as not acknowledged
strongSwan found no tunnel for the request’s User-Name, or didn’t receive
it. Check that accounting = yes is set, that UDP 3799 is open from
Trustaige’s addresses, and that dae.secret is the shared secret. A tunnel
still being set up is skipped; Trustaige’s next request reaches it.
With the gateway's check, the log says “no trusted … public key found”
The device certificate doesn’t chain to an authority in cacerts, or its IKE
identity isn’t in the certificate. Download the bundle again and load every
authority in it. See What hasn’t been confirmed yet
for Apple devices.
What hasn’t been confirmed yet
- Trustaige’s lab hasn’t yet recorded a strongSwan gateway checking an Apple
device’s certificate itself. Apple devices send their IKE identity as
tq-followed by the device ID, the device certificate’s common name, and strongSwan requires that identity in the certificate’s subject or alternative names. Use Trustaige RADIUS for Apple devices on strongSwan until this is confirmed. - How strongSwan treats an OCSP answer of revoked with the reason
certificateHoldhasn’t been recorded in the lab. Trustaige sends that answer for a device that lost its standing, and expects a refusal.