Agentless VPN with FortiToken mobile push authentication
This is a sample configuration of Agentless VPN that uses FortiToken mobile push two-factor authentication. If you enable push notifications, users can accept or deny the authentication request.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE mode. The Agentless VPN connection is established over the WAN interface.
To configure Agentless VPN using the GUI:
-
Configure the interface and firewall address. The port1 interface connects to the internal network.
-
Go to Network > Interfaces and edit the wan1 interface.
-
Set IP/Network Mask to 172.20.120.123/255.255.255.0.
-
Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
-
Click OK.
-
Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
-
-
Register FortiGate for FortiCare Support:
To add or download a mobile token on FortiGate, FortiGate must be registered for FortiCare Support. If your FortiGate is registered, skip this step.
-
Go to Dashboard > Licenses.
-
Hover the pointer on Support to check if FortiCare registered. If not, click it and select Register.
-
-
Add FortiToken mobile to FortiGate:
If your FortiGate has FortiToken installed, skip this step.
-
Go to User & Authentication > FortiTokens and click Create New.
-
Select Mobile Token and type in Activation Code.
-
Every FortiGate has two free mobile tokens. Go to User & Authentication > FortiTokens and click Import Free Trial Tokens.
-
-
Enable FortiToken mobile push:
To use FTM-push authentication, use CLI to enable FTM-Push on the FortiGate.
-
Ensure
serveris reachable from the Internet and enter the following CLI commands:config system ftm-push set server 172.20.120.123 set status enable end -
Go to Network > Interfaces.
-
Edit the wan1 interface.
-
Under Administrative Access > IPv4, select FTM.
-
Click OK.
-
-
Configure user and user group:
-
Go to User & Authentication > User Definition to create a local user agentlessvpnuser1.
-
Enter the user's Email Address.
-
Enable Two-factor Authentication and select one mobile Token from the list,
-
Enable Send Activation Code and select Email.
-
Click Next and click Submit.
-
Go to User & Authentication > User Groups to create a group agentlessvpngroup with the member agentlessvpnuser1.
-
-
Activate the mobile token:
-
When the user agentlessvpnuser1 is created, an email is sent to the user's email address. Follow the instructions to install your FortiToken mobile application on your device and activate your token.
-
-
Configure Agentless VPN portals.
-
Go to VPN > Agentless VPN Portals, and click Create New.
-
Enter a name, such as agentless-portal.
-
Under Predefined Bookmarks, click Create New, and enter the following details:
Field
Value
Name
Windows Server
Type
RDP
Host
192.168.1.114
Port
3389
Single Sign-On
Disable
Username
Set the username to log in to Windows Server.
Password
Set the password to log in to Windows Server.
Port
3389
-
Click OK to save the predefined bookmark.
-
Click OK to save the portal settings.
-
Create another Agentless VPN portal and name it portal-access-disabled.
-
Click OK to save the portal settings.
-
Disable Agentless VPN for the newly created portal (that is, portal-access-disabled) using CLI:
config vpn ssl web portal edit "portal-access-disabled" set web-mode disable next end
-
-
Configure Agentless VPN settings.
-
Go to VPN > Agentless VPN Settings.
-
Set Agentless VPN to Enable.
-
Set the Listen on Interface(s) to wan1.
-
Set Listen on Port to 10443.
-
Choose a certificate for Server Certificate. The default is Fortinet_Factory.
-
Under Authentication/Portal Mapping, set select All Other Users/Groups, and click Edit.
-
Use Portal dropdown to select portal-access-disabled.
-
Click OK.
-
In Authentication/Portal Mapping, click Create New.
-
Set Users/Groups to agentlessvpngroup.
-
Set Portal to agentless-portal.
-
Click OK.
-
-
Click Apply to save the Agentless VPN settings.
-
-
Configure Agentless VPN firewall policy:
-
Go to Policy & Objects > Firewall Policy, and click Create New.
-
Set Name to Agentless VPN firewall policy.
-
Set Schedule to always and Action to Accept.
-
Set Incoming interface to Agentless VPN tunnel interface(ssl.root).
-
Choose an Outgoing Interface. This example uses port1.
-
Set the Source to all and User/group to agentlessvpngroup.
-
Set Destination Address. In this example, the destination is the internal, protected subnet 192.168.1.0.
-
Set Service to ALL.
-
Click OK.
-
To configure Agentless VPN using the CLI:
-
Configure the interface and firewall address.
config system interface edit "wan1" set vdom "root" set ip 172.20.120.123 255.255.255.0 next end -
Configure internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface edit "port1" set vdom "root" set ip 192.168.1.99 255.255.255.0 next endconfig firewall address edit "192.168.1.0" set subnet 192.168.1.0 255.255.255.0 next end -
Register FortiGate for FortiCare Support.
To add or download a mobile token on FortiGate, FortiGate must be registered for FortiCare Support. If your FortiGate is registered, skip this step.
diagnose forticare direct-registration product-registration -a "your account@xxx.com" -p "your password" -T "Your Country/Region" -R "Your Reseller" -e 1
-
Add FortiToken mobile to FortiGate:
execute fortitoken-mobile import <your FTM code>
If your FortiGate has FortiToken installed, skip this step.
Every FortiGate has two free mobile Tokens. You can download the free token.
execute fortitoken-mobile import 0000-0000-0000-0000-0000
-
Enable FortiToken mobile push:
-
To use FTM-push authentication, ensure
serveris reachable from the Internet and enable FTM-push in the FortiGate:config system ftm-push set server 172.20.120.123 set status enable end -
Enable FTM service on WAN interface:
config system interface edit "wan1" append allowaccess ftm next end
-
-
Configure user and user group:
config user local edit "agentlessvpnuser1" set type password set two-factor fortitoken set fortitoken <select mobile token for the option list> set email-to <user's email address> set passwd <user's password> next end config user group edit "agentlessvpngroup" set member "agentlessvpnuser1" next end -
Activate the mobile token.
When the user agentlessvpnuser1 is created, an email is sent to the user's email address. Follow the instructions to install your FortiToken mobile application on your device and activate your token.
-
Configure Agentless VPN portal and predefine RDP bookmark for windows server.
config vpn ssl web portal edit "agentless-portal" set web-mode enable config bookmark-group edit "gui-bookmarks" config bookmarks edit "Windows Server" set apptype rdp set host "192.168.1.114" set port 3389 set logon-user "your-windows-server-user-name" set logon-password your-windows-server-password next end next end next end -
Configure another Agentless VPN portal and disable Agentless VPN on it.
config vpn ssl web portal edit "portal-access-disabled" set web-mode disable next end -
Configure Agentless VPN settings:
config vpn ssl settings set servercert "Fortinet_Factory" set source-interface "wan1" set source-address "all" set default-portal "portal-access-disabled" config authentication-rule edit 1 set groups "agentlessvpngroup" set portal "agentless-portal" next end end -
Configure one Agentless VPN firewall policy to allow remote user to access the internal network. This policy does not allow traffic initiated from internal network to remote client.
config firewall policy edit 1 set name "sslvpn web mode access" set srcintf "ssl.root" set dstintf "port1" set srcaddr "all" set dstaddr "192.168.1.0" set groups “sslvpngroup” set action accept set schedule "always" set service "ALL" set nat enable next end
To see the results of web portal:
-
From a remote device, use a web browser to log into the Agentless VPN web portal http://172.20.120.123:10443.
-
Log in using the agentlessvpnuser1 credentials.
The FortiGate pushes a login request notification through the FortiToken mobile application.
-
Check your mobile device and select Approve.
When the authentication is approved, agentlessvpnuser1 is logged into the Agentless VPN portal.
To check the Agentless VPN connection using the GUI:
-
On FortiGate, go to Dashboard > Agentless VPN Monitor to verify the list of Agentless VPN users.
If the Agentless VPN Monitor is hidden, click + under the Dashboard, search for Agentless VPN Monitor, and add it to the display.
-
Go to Log & Report > System Events, and use the dropdown to select VPN Events to view VPN logs.
To check the web portal login using the CLI:
get vpn ssl monitor Agentless VPN Login Users: Index User Auth Type Timeout From HTTP in/out HTTPS in/out 0 agentlessvpnuser1 1(1) 229 10.1.100.254 0/0 0/0 Agentless VPN sessions: Index User Source IP Duration I/O Bytes Tunnel/Dest IP