Agentless VPN with RADIUS on Windows NPS
This is an example configuration of Agentless VPN that uses Windows Network Policy Server (NPS) as a RADIUS authentication server.
The NPS must already be configured to accept the FortiGate as a RADIUS client and the choice of authentication method, such as MS-CHAPv2. A shared key must also have been created.
Example
The user is connecting from their PC to the FortiGate's port1 interface. RADIUS authentication occurs between the FortiGate and the Windows NPS, and the Agentless VPN connection is established once the authentication is successful.
Configure Agentless VPN with RADIUS on Windows NPS in the GUI
To configure the internal and external interfaces:
-
Go to Network > Interfaces
-
Edit the port1 interface and set IP/Network Mask to 192.168.2.5/24.
-
Edit the port2 interface and set IP/Network Mask to 192.168.20.5/24.
-
Click OK.
To create a firewall address:
-
Go to Policy & Objects > Addresses and select Address.
-
Click Create new.
-
Set Name to 192.168.20.0.
-
Leave Type as Subnet
-
Set IP/Netmask to 192.168.20.0/24.
-
Click OK.
To add the RADIUS server:
-
Go to User & Authentication > RADIUS Servers and click Create New.
-
Set Name to rad-server.
-
Leave Authentication method set to Default. The PAP, MS-CHAPv2, and CHAP methods will be tried in order.
-
Under Primary Server, set IP/Name to 192.168.20.6 and Secret to the shared secret configured on the RADIUS server.
-
Click Test Connectivity to test the connection to the server, and ensure that Connection status is Successful.
-
Optionally, click Test User Credentials to test user credentials. Testing from the GUI is limited to PAP.
-
Click OK.
To configure a user group:
-
Go to User & Authentication > User Groups and click Create New.
-
Set Name to rad-group.
-
Under Remote Groups, click Add and add the rad-server.
-
Click OK.
To configure Agentless VPN portals:
-
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
-
To 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.
-
Set Server Certificate to the authentication certificate.
-
In Authentication/Portal Mapping, select All Other Users/Groups, and click Edit.
-
Use Portal dropdown to select portal-access-disabled.
-
In Authentication/Portal Mapping, click Create New.
-
Set Users/Groups to rad-group.
-
Set Portal to agentless-portal.
-
Click OK.
-
-
Click Apply to save the Agentless VPN settings.
To configure an Agentless VPN firewall policy:
-
Go to Policy & Objects > Firewall Policy and click Create New.
-
Set Name as 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 Source to all and User/group to rad-group.
-
In this example, the Destination is the internal, protected subnet 192.168.20.0.
-
Set Service to ALL.
-
Click OK.
Configure Agentless VPN with RADIUS on Windows NPS in the CLI
To configure Agentless VPN using the CLI:
-
Configure the internal and external interfaces:
config system interface edit "port1" set vdom "root" set ip 192.168.2.5 255.255.255.0 set alias internal next edit "port2" set vdom "root" set ip 192.168.20.5 255.255.255.0 set alias external next end -
Configure the firewall address:
config firewall address edit "192.168.20.0" set subnet 192.168.20.0 255.255.255.0 next end -
Add the RADIUS server:
config user radius edit "rad-server" set server "192.168.20.6" set secret ********* next end -
Create a user group and add the RADIUS server to it:.
config user group edit "rad-group" set member "rad-server" next end -
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 "server_certificate" set source-interface "wan1" set source-address "all" set default-portal "portal-access-disabled" config authentication-rule edit 1 set groups "rad-group" set portal "agentless-portal" next end end -
Configure 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 "Agentless VPN firewall policy" set srcintf "ssl.root" set dstintf "port1" set srcaddr "all" set dstaddr "192.168.1.0" set action accept set schedule "always" set service "ALL" set nat enable set groups “rad-group” next end
Results
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 Agentless VPN connection using the CLI:
# get vpn ssl monitor Agentless VPN Login Users: Index User Group Auth Type Timeout From HTTP in/out HTTPS in/out 0 radkeith rad-group 2(1) 295 192.168.2.202 0/0 0/0 Agentless VPN sessions: Index User Group Source IP Duration I/O Bytes Tunnel/Dest IP