Skip to content

Users, groups & two-factor authentication

fr0ntier manages remote-access users itself, the way FortiGate does with local users, FortiClient and FortiToken — with open tools: OpenVPN clients and any authenticator app (or a code sent by e-mail).

flowchart LR
  U[OpenVPN client] -->|certificate + user + password| O[OpenVPN server]
  O -->|management interface| D[fr0ntier daemon]
  D -->|password, account, groups| C[(Users & groups)]
  D -->|authenticator code| T[TOTP RFC 6238]
  D -->|e-mail code| S[SMTP server]
  D -->|tunnel IP of the user| N[nftables group sets]
  N --> P[Identity-based policies]

Every connection is decided by the fr0ntier daemon through the OpenVPN management interface (management-client-auth): no scripts, no plugins, no external RADIUS server.

Users

User & Authentication › Users

Field Meaning
User name Login name (letters, digits, . _ @ -).
Full name, e-mail Shown in the UI; the e-mail receives codes and the access e-mail.
Password Stored as a PBKDF2-SHA256 hash. Generate creates a strong random password and copies it. When editing, leave it empty to keep the current one.
Account expires The account stops working after this date (contractors, temporary access).
Two-factor Authenticator app (TOTP), code by e-mail or none.
User groups Decide which OpenVPN servers the user may use and which identity policies apply.
Fixed VPN address Optional: always give this tunnel address to the user.

From the user list you can:

  • show the authenticator QR code (QR) to scan with Google Authenticator, Microsoft Authenticator, Aegis, 2FAS, 1Password, Bitwarden…;
  • send the access e-mail (✉): connection instructions, the authenticator QR code and, optionally, the VPN profile as an attachment;
  • download the VPN profile of the user for an OpenVPN server;
  • unlock an account locked after too many failures.

The status column shows active, online · N (sessions), locked, expired or disabled, and the date and address of the last login.

Commit

Users, like everything else, are part of the candidate configuration: create or change them, then commit. The authenticator key exists as soon as the user is saved, so the QR code can be scanned before the commit; it becomes valid when the commit is applied.

User groups

User & Authentication › User Groups — plain names (sales, it-admins, contractors). A group is used by:

  • OpenVPN servers — Allowed user groups: only members can connect (none selected = every user);
  • firewall policies — the User groups (VPN identity) field restricts a policy to the tunnel addresses of connected members (see below).

Two-factor authentication

RFC 6238 codes (SHA-1, 6 digits, 30 s) generated by any authenticator app. The profile of the user contains static-challenge "Authenticator code", so the OpenVPN client asks for the code together with the password. Clients without static challenge support get the question as a dynamic challenge after the password is accepted.

Codes are accepted in a ±30 s window and each code can be used only once.

After a correct password, fr0ntier sends a one-time code (6–10 digits, valid 5 minutes by default) to the user's e-mail and asks for it with an OpenVPN dynamic challenge (CRV1). The client shows "Enter the code sent to a***@example.org".

Requires the e-mail server. A code allows three attempts.

Password only (plus the personal certificate on certificate + password servers).

After a successful login OpenVPN gives the client a session token (auth-gen-token), valid for Re-authenticate every (hours) (8 h by default). Reconnections and key renegotiations inside that time use the token — users are not asked for a new code every time their laptop wakes up — but the daemon still re-checks the account (enabled, not expired, still in an allowed group) on every renegotiation.

OpenVPN server authentication

VPN › OpenVPN — Users & authentication:

Mode Client needs Use
Personal certificate + user password (+2FA) (recommended) a profile with the user's own certificate, the password and the second factor Remote access: a stolen password alone is useless, a stolen laptop alone is useless. The certificate CN must match the user name.
User password (+2FA) a generic profile (CA only), the password and the second factor When certificates cannot be deployed.
Device certificates only a certificate per device (Device certificates table) Site-to-site, routers, IoT.

Personal certificates are issued automatically for every enabled user of the allowed groups and revoked (CRL) when the user is disabled, deleted or removed from the groups.

Other options: Allow several sessions per user (otherwise a new login replaces the old session), client to client, split tunnel (Push routes) or full tunnel, DNS push.

Client setup

  1. Install OpenVPN Connect (Windows, macOS, iOS, Android) or OpenVPN / NetworkManager on Linux.
  2. Import the profile (.ovpn) — downloaded from the user list or attached to the access e-mail.
  3. Connect with the user name and password, then the authenticator or e-mail code.

Sessions

VPN › Remote Sessions lists connected users with groups, remote and tunnel address, second factor used, client platform/version, connection time and traffic. Disconnect ends a session. In the CLI: get vpn sessions, execute vpn disconnect <server> <id>, get user status, execute user unlock <name>.

Every event is logged in the vpn stream (Monitoring › Events) and can be exported to a SIEM: login, connected, disconnected (bytes, duration), auth-failed (reason), 2fa-email-sent, kicked, unlocked.

Identity-based policies

Add User groups (VPN identity) to a firewall policy and it matches only traffic coming from the tunnel addresses of connected members of those groups:

# From To Source User groups Destination Service Action
10 ovpn1 LAN all it-admins all ALL ACCEPT
11 ovpn1 LAN all sales crm, nas HTTPS, SMB ACCEPT

The daemon keeps one nftables set per group (ug_<group>) with the addresses of connected members; sets are updated on connect/disconnect and rebuilt after every commit. Use Policy Lookup with a VPN user to test these rules.

Lockout & password policy

User & Authentication › Authentication Settings: minimum password length, lockout after N failures (wrong password or code) for M minutes, authenticator issuer name, e-mail code length and validity. Administrators of the firewall itself have separate settings (System › Settings › Administration) and their own optional TOTP.

E-mail server

System › E-mail Server — SMTP server used for e-mail codes, access e-mails and (by e-mail notifiers without their own server) alert notifications.

Field Notes
Security STARTTLS (587), TLS (465) or none (25, local relay only — passwords are never sent without TLS).
User name / password PLAIN or LOGIN authentication (Gmail/Google Workspace app passwords, Microsoft 365, Fastmail, your own server…).
Sender Address and display name.

Send test e-mail uses the settings saved in the candidate, so you can test before committing.