SSL VPN with FortiToken mobile push authentication
This is a sample configuration of SSL 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 SSL VPN connection is established over the WAN interface.
To configure SSL 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 FortiCare 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 & Device > FortiTokens and click Create New.
- Select Mobile Token and type in Activation Code.
- Every FortiGate has two free mobile tokens. Go to User & Device > 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
server-ip
is reachable from the Internet and enter the following CLI commands:config system ftm-push set server-ip 172.20.120.123 set status enable end
- Go to Network > Interfaces.
- Edit the wan1 interface.
- Under Administrative Access > IPv4, select FTM.
- Click OK.
- Ensure
- Configure user and user group.
- Go to User & Device > User Definition to create a local user sslvpnuser1.
- 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 & Device > User Groups to create a group sslvpngroup with the member sslvpnuser1.
- Activate the mobile token.
- When the user sslvpnuser1 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 SSL VPN web portal.
- Go to VPN > SSL-VPN Portals to edit the full-access portal.
This portal supports both web and tunnel mode.
- Disable Enable Split Tunneling so that all SSL VPN traffic goes through the FortiGate.
- Go to VPN > SSL-VPN Portals to edit the full-access portal.
- Configure SSL VPN settings.
- Go to VPN > SSL-VPN Settings.
- Select the Listen on Interface(s), in this example, wan1.
- Set Listen on Port to 10443.
- Set Server Certificate to the authentication certificate.
- Under Authentication/Portal Mapping, set default Portal web-access for All Other Users/Groups.
- Create new Authentication/Portal Mapping for group sslvpngroup mapping portal full-access.
- Configure SSL VPN firewall policy.
- Go to Policy & Objects > IPv4 Policy.
- Fill in the firewall policy name. In this example, sslvpn certificate auth.
- Incoming interface must be SSL-VPN tunnel interface(ssl.root).
- Set the Source Address to all and Source User to sslvpngroup.
- Set the Outgoing Interface to the local network interface so that the remote user can access the internal network. In this example, port1.
- Set Destination Address to the internal protected subnet 192.168.1.0.
- Set Schedule to always, Service to ALL, and Action to Accept.
- Enable NAT.
- Configure any remaining firewall and security options as desired.
- Click OK.
To configure SSL 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 end
config 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.
- If your FortiGate has FortiToken installed, skip this step.
execute fortitoken-mobile import <your FTM code>
- Every FortiGate has two free mobile Tokens. You can download the free token.
execute fortitoken-mobile import 0000-0000-0000-0000-0000
- If your FortiGate has FortiToken installed, skip this step.
- Enable FortiToken mobile push.
- To use FTM-push authentication, ensure
server-ip
is reachable from the Internet and enable FTM-push in the FortiGate.config system ftm-push set server-ip 172.20.120.123 set status enable end
- Enable FTM service on WAN interface.
config system interface edit "wan1" append allowaccess ftm next end
- To use FTM-push authentication, ensure
- Configure user and user group.
config user local edit "sslvpnuser1" 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 "sslvpngroup" set member "sslvpnuser1" next end
- Activate the mobile token.
- When the user sslvpnuser1 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 SSL VPN web portal.
config vpn ssl web portal edit "full-access" set tunnel-mode enable set web-mode enable set ip-pools "SSLVPN_TUNNEL_ADDR1" set split-tunneling disable next end
- Configure SSL VPN settings.
config vpn ssl settings set servercert "server_certificate" set tunnel-ip-pools "SSLVPN_TUNNEL_ADDR1" set source-interface "wan1" set source-address "all" set default-portal "web-access" config authentication-rule edit 1 set groups "sslvpngroup" set portal "full-access" next end end
- Configure one SSL VPN firewall policy to allow remote user to access the internal network.
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 SSL VPN web portal http://172.20.120.123:10443.
- Log in using the sslvpnuser1 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, sslvpnuser1 is logged into the SSL VPN portal.
- On the FortiGate, go to Monitor > SSL-VPN Monitor to confirm the user connection.
To see the results of tunnel connection:
- Download FortiClient from www.forticlient.com.
- Open the FortiClient Console and go to Remote Access > Configure VPN.
- Add a new connection.
- Set the connection name.
- Set Remote Gateway to the IP of the listening FortiGate interface, in this example, 172.20.120.123.
- Select Customize Port and set it to 10443.
- Save your settings.
- Log in using the sslvpnuser1 credentials and click FTM Push.
The FortiGate pushes a login request notification through the FortiToken mobile application.
- Check your mobile device and select Approve.
When the authentication is approved, sslvpnuser1 is logged into the SSL VPN tunnel.
To check the SSL VPN connection using the GUI:
- Go to VPN > Monitor > SSL-VPN Monitor to verify the user’s connection.
- Go to Log & Report > Forward Traffic to view the details of the SSL VPN traffic.
To check the web portal login using the CLI:
get vpn ssl monitor SSL VPN Login Users: Index User Auth Type Timeout From HTTP in/out HTTPS in/out 0 sslvpnuser1 1(1) 229 10.1.100.254 0/0 0/0 SSL VPN sessions: Index User Source IP Duration I/O Bytes Tunnel/Dest IP
To check the tunnel login using the CLI:
get vpn ssl monitor SSL VPN Login Users: Index User Auth Type Timeout From HTTP in/out HTTPS in/out 0 sslvpnuser1 1(1) 291 10.1.100.254 0/0 0/0 SSL VPN sessions: Index User Source IP Duration I/O Bytes Tunnel/Dest IP 0 sslvpnuser1 10.1.100.254 9 22099/43228 10.212.134.200