Configure VPN on an Edge Gateway
The VPN server function is built into Edge Gateways. The following VPN types are available:
- IPSec (Site-to-site VPN) — used to create a secure tunnel between sites. For example, between a head office network and a network at a remote site or in the cloud;
- SSL VPN (Remote Access VPN) — used to connect individual users to private corporate networks using a VPN client;
- L2 VPN — allows you to combine networks located at different sites (in different Cloud Director infrastructures) into a single broadcast domain, for example, during virtual machine migration.
Connect IPsec
- From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based cloud → the **Cloud Director **. section.
- Open the virtual data center page.
- Go to Networking → Edges.
- Open the page of the required Edge.
- Click Services.
- Open the VPN → IPsec VPN → IPsec VPN Sites.
- Click +.
- Optional: to activate the remote site, enable the Enabled toggle switch.
- Optional: to ensure each new cryptographic key is not linked to any previous key, enable the PFS toggle switch.
- In the Local Endpoint field, enter the external address of the NSX Edge.
- In the Local Subnets field, enter the local networks in CIDR format that will use IPsec VPN.
- In the Peer ID field, enter the address of the remote site.
- In the Peer Endpoint field, enter the address of the remote site.
- In the Peer Subnets field, enter the networks that will use IPsec VPN on the remote side.
- In the Encryption Algorithm field, select the tunnel encryption algorithm.
- In the Authentication field, select how the peer will be authenticated — using a Pre-Shared Key or a certificate.
- In the Pre-Shared Key field, enter the key that will be used for authentication. The key must match on both sides.
- In the Diffie-Hellman Group field, select the key group number in the key exchange algorithm.
- In the Digest algorithm field, select the packet integrity hashing algorithm.
- In the IKE option field, select the IKE (Internet Key Exchange) protocol version.
- To ensure the Edge does not initiate a connection upon startup but waits for a connection from the remote side, enable the IKE responder only toggle switch.
- In the Session type field, select the tunnel type. For more information about tunnels, see the Policy-Based IPSec VPN or Route-Based IPSec VPN instructions in the VMware documentation.
- Click Keep.
- Open the VPN → IPsec VPN → Activation Status.
- Enable the IPsec VPN Service Status toggle switch.
- Open the Statistics → IPsec VPN.
- Check that the VPN status is active in the Channel Status column.
View tunnel status
The number of IPsec tunnels depends on the size of the deployed Edge gateway. By default, 512 IPsec tunnels are available.
-
From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based cloud → the **Cloud Director **. section.
-
Open the virtual data center page.
-
Go to Networking → Edges.
-
Open the page of the required Edge.
-
Click Services.
-
Open the Edge settings tab.
-
In the SSH Status block, enable the Enabled toggle switch.
-
Enter the login and password for SSH access and allow it in the Firewall settings. We do not recommend leaving SSH enabled.
-
In the Edge console, check the service status:
show service ipsec -
Check the site status and negotiated parameters:
show service ipsec site -
Check the Security Association (SA) status:
show service ipsec sa
Connect SSL VPN
SSL VPN-Plus is a Remote Access VPN option. It allows individual remote users to securely connect to private networks located behind an NSX Edge gateway. In the case of SSL VPN-Plus, an encrypted tunnel is established between the client (Windows, Linux, Mac) and the VMware NSX® Edge™.
-
From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based cloud → the **Cloud Director **. section.
-
Open the virtual data center page.
-
Go to Networking → Edges.
-
Open the page of the required Edge.
-
Click Services.
-
Open the SSL VPN-Plus → Authentication.
-
Click +Local.
-
Configure and enable the authentication server. During configuration, you can select policies for generating new passwords and set up options for locking user accounts (for example, the number of failed password attempts); see the Configure an Authentication Service for SSL VPN-Plus on an NSX Data Center for vSphere Edge Gateway instructions in the VMware documentation.
-
Click Keep.
-
Open the SSL VPN-Plus → Server Settings.
-
In the IP Address and Port fields, specify the address and port on which the server will listen for incoming connections.
-
Enable the Enable Logging toggle switch.
-
In the Cipher List block, select the required encryption algorithms.
-
Optional: to change the certificate the server will use, click CHANGE SERVER CERTIFICATE.
-
Enable the Enable toggle switch.
-
Click Save changes.
-
Open the SSL VPN-Plus → Users.
-
Click +.
-
In the User ID field, enter the user identifier.
-
In the Password field, enter the user password.
-
To enable the user, turn on the Enabled toggle switch.
-
Click Keep.
-
Open the SSL VPN-Plus → Installation Packages.
-
To create an installer that a remote employee can download for installation, click +.
-
In the Profile Name field, enter a name for the installation package profile.
-
In the Gateway field, enter the server address; you can view it on the SSL VPN-Plus → Server Settings → IP Address.
-
In the Port field, enter the server port; you can view it on the SSL VPN-Plus → Server Settings → Port.
-
Select installation packages for different operating systems. The Windows package is created by default and is always available.
-
Optional: to have the VPN client added to startup on the remote machine, check the start client on logon checkbox (Windows only).
-
Optional: to create a VPN client icon on the desktop, check the create desktop icon checkbox (Windows only).
-
Optional: to validate the server certificate during connection, check the server security certificate validation checkbox (Windows only).
-
Open the SSL VPN-Plus → IP Pools.
-
Click +.
-
In the IP Range field, specify the range of addresses to be assigned to users when they connect.
-
In the Netmask field, specify the network mask.
-
In the Gateway field, specify the network gateway.
-
Optional: configure DNS and WINS servers.
-
Open the Private Networks tab.
-
Click +.
-
In the Network field, add the local network that remote users will be able to access.
-
In the Send traffic field, select the traffic forwarding method:
- over tunnel — through the tunnel;
- bypass tunnel — directly, bypassing the tunnel.
-
If you selected over tunnel as the traffic forwarding method, check the Enable TCP Optimization checkbox.
Connect to the created installation package
- Open a web browser using the external address and port you defined in the Firewall settings.
- Enter your user credentials. After successful authorization, a list of created installation packages available for download will open.
- Download the created installation package.
- Unpack the downloaded archive.
- Install the client.
- Run the client.
- In the authorization window, click Login.
- In the certificate verification window, click Yes.
- Enter your user credentials.
Connect NSX L2 VPN
When moving to a different geographical site, the virtual machine will retain its IP addressing settings and will not lose connectivity with other virtual machines in the same L2 domain. You can use this feature if you have two virtual machines located in different virtual data centers or regions.
The first VM has the address 10.10.10.2/24, and the second VM has 10.10.10.200/24.
Sites combined into a single broadcast domain must be built on the NSX platform. Using a standalone NSX Edge is possible; see the VMware Customer Connect documentation (registration on the site is required to view).
-
From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based cloud → the **Cloud Director **. section.
-
Open the virtual data center page.
-
Go to Networking → Networks.
-
Click New.
-
Create a network with the following parameters:
- Scope — select Current Organization Virtual Data Center;
- Network Type — select Routed;
- Interface Type — select subinterface;
- Gateway CIDR — specify
10.10.10.1/24.
-
Open the Data Centers → Virtual Data Center.
-
Open the page of the second virtual data center.
-
Add a network with the same parameters.
Configure the NSX L2 VPN server
- From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based cloud → the **Cloud Director **. section.
- Open the virtual data center page.
- Go to Networking → Edges.
- Open the page of the required Edge.
- Click Services.
- Open the VPN → L2VPN.
- Enable the L2VPN toggle switch.
- In the L2VPN mode field, select Server.
- On the Server Global tab, enter the external IP address of the Edge gateway on which the tunnel port will be listened to. By default, the socket will open on port 443, but you can change it.
- Specify the encryption settings for the tunnel.
- Open the Server Sites tab.
- Click +.
- Enable the Enabled toggle switch.
- Enter the peer name.
- Enter the user name and password.
- In the Egress Optimization Gateway Address field, enter the gateway address to avoid IP address conflicts, as the created networks use the same gateway address.
- Click Select sub-interfaces.
- Select the required subinterface.
- Save the settings. The created client site will appear in the settings.
Configure the NSX L2 VPN client
- From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based cloud → the **Cloud Director **. section.
- Open the virtual data center page.
- Go to Networking → Edges.
- Open the page of the required Edge.
- Click Services.
- Open the VPN → L2VPN.
- Enable the L2VPN toggle switch.
- In the L2VPN mode field, select Client.
- On the Client Global tab, specify the address and port of the NSX Edge of the first virtual data center, which was specified in the Listening IP and Port fields on the server side.
- Configure encryption the same way as on the server so that settings match when the tunnel is established.
- Click SELECT SUB-INTERFACES.
- Select the subinterface through which the tunnel for L2VPN will be established.
- In the Egress Optimization Gateway Address field, enter the gateway address.
- In the User Id field, enter the user name.
- In the Password field, enter the password.
- In the Confirm Password field, confirm the password.
- Save the settings.
- On any Edge gateway, on the Statistics → L2VPN tab, check the tunnel.