Skip to content

Remote access VPN

  1. VPN → WireGuard → Create tunnel: name wg0, Generate the key, listen port 51820, address 10.66.0.1/24, administrative access ping dns, public host = your public DNS name or IP.
  2. In Peers click Add road warrior for each device.
  3. Save, add wg0 to a zone (e.g. VPN) and create policies VPN → LAN (and VPN → WAN with NAT if clients should browse through the firewall).
  4. Commit, then click the QR icon of a peer: scan it with the WireGuard app or download the .conf.

If the firewall is behind another router, forward UDP 51820 to it.

OpenVPN with users and two-factor authentication

The FortiGate SSL-VPN experience — users, groups, tokens — with OpenVPN clients and any authenticator app.

  1. System → E-mail Server (optional, for e-mail codes and access e-mails): SMTP server, STARTTLS, user, password, sender. Send test e-mail.
  2. User & Authentication → User Groups: create vpn-users (and more, e.g. it-admins).
  3. User & Authentication → Users → Create user: user name, full name, e-mail, Generate a password, two-factor Authenticator app, group vpn-users.
  4. VPN → OpenVPN → Create instance: mode server, UDP 1194, network 10.8.0.0/24, authentication Personal certificate + user password, allowed groups vpn-users, push routes (your LANs) or full tunnel, push DNS, public host (your DNS name).
  5. Add ovpn1 to a zone (e.g. VPN) and write policies VPN → LAN — optionally with User groups to give each group only what it needs.
  6. Commit. Certificates are issued for every user of the allowed groups.
  7. In the user list click ✉ Send access e-mail (choose Attach the ovpn1 profile) or download the profile and the QR code yourself.
  8. The user installs OpenVPN Connect, imports the profile, scans the QR code with an authenticator app and connects with user name, password and code.

Follow connected users in VPN → Remote Sessions. Disabling a user disconnects them and revokes their certificate at the next commit. Details in Users, groups & 2FA.

If the firewall is behind another router, forward UDP 1194 (and 51820 for WireGuard) to it.