To connect VPN clients to the corporate network, UserGate needs to be configured for working in the VPN server role. To do that, follow these steps:
Task |
Description |
---|---|
Step 1. Allow the VPN service in the zone to which VPN clients will connect. |
In the Network --> Zones section, edit the access control settings for the zone to which VPN clients will connect, and enable the VPN service. Usually, this is the Untrusted zone. |
Step 2. Create a zone where the clients connecting using a VPN will be placed. |
In the Network --> Zones section, create a zone where the clients connecting using a VPN will be placed. This zone can later be used in security policies. It is recommended to use the existing default zone, VPN for remote access. |
Step 3. Create a NAT rule for the newly created zone. |
Clients connect to the VPN server using the Point-to-Point protocol. To enable traffic from the zone created at the previous step, create a NAT rule from this zone to all desired zones in the Network policies --> NAT and routing section. In UserGate, there is a default rule named NAT from VPN for remote access to Trusted and Untrusted that allows NATing from the zone VPN for remote access to the Trusted and Untrusted zones. |
Step 4. Create a firewall rule that allows traffic from the zone created earlier. |
In the Network policies --> Firewall section, create a firewall rule that allows traffic from the zone you created to other zones. In UserGate, there is a default rule named VPN for remote access to Trusted and Untrusted that allows all traffic from the zone VPN for remote access to the Trusted and Untrusted zones. |
Step 5. Create an authentication profile. |
In the Users and devices --> Auth profiles section, create an authentication profile for VPN users. The same authentication profile may be used that you use to authorize users for Internet access. Note that transparent authentication methods such as Kerberos, NTLM, or SAML IDP cannot be used for VPN authorization. VPN supports multi-factor authentication. The second factor can be received in the form of TOTP single-use codes. To enter the second authentication factor, the user connecting to the VPN server should provide their password as follows: password:single_use_code where password is the user's password; : is a separator; and single_use_code is the second authentication factor. For more details on authentication profiles, see the section Authentication Profiles. |
Step 6. Create a VPN security profile. |
A security profile contains settings such as the pre-shared key and encryption and authentication algorithms. Multiple security profiles may be used for connecting to different client types. To create a profile, go to VPN --> Security profiles, click Add, and fill in these fields:
Next, the settings for the first and second negotiation phases need to be configured. In the first phase, IKE security is negotiated. The authentication is done using a pre-shared key in the mode selected earlier. Provide the following settings:
In the second phase, the method for securing IPsec connections is selected. You need to specify the following:
In UserGate, there is a default security profile named Remote access VPN profile that provides the required settings. If you plan to use this profile, make sure to change the pre-shared encryption key. To facilitate connection setup for 3rd party devices, there are additional default security profiles (Cisco compatible VPN profile for Cisco devices and Fortinet compatible VPN profile for Fortinet devices). |
Step 7. Create a VPN interface. |
A VPN interface is a virtual network adapter that will be used to connect VPN clients. This is a cluster-type interface, which means that it will be created automatically on all UserGate configuration cluster nodes. If a HA cluster exists, VPN clients will be automatically switched to a backup server in case of any problems with the active server without terminating the existing VPN connections. In the Network --> Interfaces section, click Add and select Add VPN. Provide the following settings:
There is a default VPN interface named tunnel1 that is recommended for use as a Remote access VPN interface. |
Step 8. Create a VPN network. |
A VPN determines the network settings that will be used for connecting the client to the server. This is primarily the assignment of IP addresses to the clients inside the tunnel, the DNS settings, and (optionally) the routes that will be passed to the clients that support the use of routes assigned to them. Multiple tunnels may be used with different settings for different clients. To create a VPN tunnel, go to VPN --> VPN networks, click Add, and fill in these fields:
There is a predefined network in UserGate named Remote access VPN network with the recommended settings. |
Step 9. Create a VPN server rule. |
Create a VPN server rule using the VPN network, interface, and profile created earlier. To create the rule, go to VPN --> Server rules, click Add, and fill in these fields:
In UserGate, there is a default server rule named Remote access VPN rule that provides the required settings for a Remote Access VPN, and VPN access is allowed to the members of the local group VPN users. Important! To apply different server rules to different clients, use the Source zone and Source address settings. The User parameter does not govern the selection of a server rule, as the user is checked only after the VPN connection has been established. |
Step 10. Configure a VPN connection on the client computer. |
To configure a VPN connection on a user's computer, provide these settings:
Important! Microsoft Windows operating systems require registry settings to be modified to work correctly with an L2TP/IPSec VPN server. Windows OS versions 10 and higher do not support L2TP connections to servers that are located behind upstream routers with NAT functionality by default. To establish a connection, the following changes must be made to the registry:
Important! After changes made you should apply them. For example, restart your computer. For more detailed instructions, see this Microsoft article: https://docs.microsoft.com/en-US/troubleshoot/windows-server/networking/configure-l2tp-ipsec-server-behind-nat-t-device. |