SAML authentication for VPN before logon 7.2.5
With SAML authentication for IPsec and SSL VPN before logon, you can connect to VPN before signing in to Windows, improving ease of access.
The following example uses FortiOS 7.2.8 with FortiClient and EMS 7.2.5.
Use case: SAML authentication with FortiAuthenticator as IdP
The following instructions that FortiAuthenticator has already been configured to support SAML login.
To configure SAML authentication with FortiAuthenticator as IdP:
- Configure the VPN settings in FortiOS:
config vpn ipsec phase1-interface edit "ikeV2" set type dynamic set interface "port1" set ike-version 2 set peertype any set net-device disable set mode-cfg enable set proposal aes256-sha256 aes128-sha256 set comments "VPN: ikeV2 (Created by VPN wizard)" set dhgrp 5 set eap enable set eap-identity send-request set authusrgrp "saml-group" set ipv4-start-ip 10.20.30.1 set ipv4-end-ip 10.20.30.250 set dns-mode auto set save-password enable set client-auto-negotiate enable set client-keep-alive enable set psksecret ENC y1+jieyn2rEnylBuykQQjPDIVG2dP9RraKl5lhOHrZZyn7rBh4lmUUQ+wYYQhdicxM/VnxCFqjQj5JvdYLeB4j/j+9CSGWlRxNZnpaaoUgjZhWxqVhU2pGxZfyBtOSwvtCq8bMcAKrtZbnbr+o/5WrbUZ51AXcJP9R5fW7qR4J3n7ZvRTBWEZ0EJmPoXiGd77iQqQQ== next end config vpn ipsec phase2-interface edit "ikeV2" set phase1name "ikeV2" set proposal aes256-sha256 aes128-sha256 set dhgrp 5 set comments "VPN: ikeV2 (Created by VPN wizard)" next end config system global set auth-ike-saml-port 10428 end config user saml edit "IPSec-FAC" set cert "Fortinet_Factory" set entity-id "https://fgt.example.com:10428/remote/saml/metadata/" set single-sign-on-url "https://fgt.example.com:10428/remote/saml/login/" set single-logout-url "https://fgt.example.com:10428/remote/saml/logout/" set idp-entity-id "http://fac.example.com/saml-idp/1111/metadata/" set idp-single-sign-on-url "https://fac.example.com/saml-idp/1111/login/" set idp-single-logout-url "https://fac.example.com/saml-idp/1111/logout/" set idp-cert "REMOTE_Cert_8" set user-name "username" set group-name "saml-group" set digest-method sha1 next end
- In EMS, configure the VPN settings:
- Go to Endpoint Profiles > Remote Access.
- Create a new profile or edit an existing one.
- Under General, enable Show VPN before Logon.
- Under VPN Tunnels, click Add Tunnel.
- Select Manual. Click Next.
- If available, under Type, select IPsec VPN.
- In Advanced Settings, toggle on Enable SAML Login.
- In the SAML Port field, enter 10428, the same port that you configured in FortiOS.
- Configure the tunnel to match the settings that you configured in FortiOS. Click Save.
- On the endpoint, if required, add the FortiAuthenticator FQDN as an entry in the hosts file if required.
- After the endpoint receives the profile updates from EMS, restart the endpoint.
- On the login page, under Sign-in options, select the VPN option.
- Enter the Windows login credentials.
- A SAML authentication dialog displays after the certificate warning. Enter your SAML login credentials. After a successful login, FortiClient connects to the IPsec VPN tunnel successfully.
Use case: SAML authentication with Microsoft Entra ID as IdP
In this example, the endpoint is already joined to a Microsoft Entra ID domain.
To log in using SAML authentication with Microsoft Entra ID as IdP:
- After the endpoint receives the profile updates from EMS, restart the endpoint.
- On the login page, under Sign-in options, select the VPN option.
- A SAML authentication dialog displays after the certificate warning. Enter your Entra ID login credentials. After a successful login, FortiClient connects to the VPN tunnel successfully.