Set up a VPN
The VPN server function is built into the Edge routers. VPN types available:
- IPSec (Site-to-site VPN — Used to create a secure tunnel between sites. For example, between the main office network and a network at a remote site or in the cloud;
- SSL VPN (Remote Access VPN) — used to connect individual users to an organization's private networks using a VPN client;
- L2 VPN — allows you to combine networks located on different sites (in different Cloud Director infrastructures) into one broadcast domain — for example, when migrating a virtual machine.
Connect IPsec
- From control panel open the Cloud Director panel: VMware-based cloud → Cloud Director.
- Open the virtual data center page.
- Go to the section Networking → Edges.
- Open the page of the desired Edge.
- Click Services.
- Open the tab VPN → IPsec VPN → IPsec VPN Sites.
- Click +.
- Optional: to activate the remote site, turn on the toggle switch Enabled.
- Optional: to prevent each new cryptographic key from being associated with any previous key, turn on the toggle switch PFS.
- In the field Local Endpoint enter the external address of the NSX Edge.
- In the field Local Subnets enter the local networks in CIDR format that will use the IPsec VPN.
- In the field Peer ID enter the address of the remote site.
- In the field Peer Endpoint enter the address of the remote site.
- In the field Peer Subnets Enter the networks that will use the IPsec VPN on the remote side.
- In the field Encryption Algorithm select the tunnel encryption algorithm.
- In the field Authentication select how the peer will be authenticated — by Pre-Shared Key or certificate.
- In the field Pre-Shared Key enter the key that will be used for authentication. The key must match on both sides.
- In the field Diffie-Hellman Group select the key group number in the key exchange algorithm.
- In the field Digest algorithm select the packet integrity control hashing algorithm.
- In the field IKE option Select the version of the IKE (Internet Key Exchange) protocol.
- To ensure that Edge does not initiate a connection when it is turned on, but waits for a connection from the remote side, enable the toggle switch IKE responder only.
- In the field Session type select a tunnel type. More information about tunnels in the instructions Policy-Based IPSec VPN or Route-Based IPSec VPN VMware documentation.
- Click Keep.
- Open the tab VPN → IPsec VPN → Activation Status.
- Turn on the toggle switch IPsec VPN Service Status.
- Open the tab Statistics → IPsec VPN.
- Check that the column Channel Status VPN status is active.
View tunnel status
The number of IPsec tunnels depends on the size of the deployed Edge router. By default, 512 IPsec tunnels are available.
-
From control panel open the Cloud Director panel: VMware-based cloud → Cloud Director.
-
Open the virtual data center page.
-
Go to the section Networking → Edges.
-
Open the page of the desired Edge.
-
Click Services.
-
Open the tab Edge settings.
-
In the block SSH Status toggle switch Enabled.
-
Enter the login and password for SSH access and enable it in the Firewall settings. It is not recommended to leave SSH enabled.
-
In the Edge console, check the status of the service:
show service ipsec
-
Check the status of the site and agreed parameters:
show service ipsec site
-
Check the status of the Security Association (SA):
show service ipsec sa
Connect SSL VPN
SSL VPN-Plus is one of the Remote Access VPN options. It allows individual remote users to securely connect to private networks behind the NSX Edge gateway. An encrypted tunnel in the case of SSL VPN-plus is established between the client (Windows, Linux, Mac) and VMware NSX® Edge™.
-
From control panel open the Cloud Director panel: VMware-based cloud → Cloud Director.
-
Open the virtual data center page.
-
Go to the section Networking → Edges.
-
Open the page of the desired Edge.
-
Click Services.
-
Open the tab SSL VPN-Plus → Authentication.
-
Click +Local.
-
Configure and enable the authentication server. During configuration, you can select policies for generating new passwords and configure options for locking user accounts (e.g., number of retries for incorrect passwords), see the instructions for more details Configure an Authentication Service for SSL VPN-Plus on an NSX Data Center for vSphere Edge Gateway VMware documentation.
-
Click Keep.
-
Open the tab SSL VPN-Plus → Server Settings.
-
In the fields IP Address and Port specify the address and port on which the server will listen for incoming connections.
-
Turn on the toggle switch Enable Logging.
-
In the block Cipher List check the required encryption algorithms.
-
Optional: To change the certificate to be used by the server, click CHANGE SERVER CERTIFICATE.
-
Turn on the toggle switch Enable.
-
Click Save changes.
-
Open the tab SSL VPN-Plus → Users.
-
Click +.
-
In the field User ID enter the user ID.
-
In the field Password enter the user's password.
-
To enable the user, turn on the toggle switch Enabled.
-
Click Keep.
-
Open the tab SSL VPN-Plus → Installation Packages.
-
To create an installer that a remote employee can download for installation, click +.
-
In the field Profile Name enter the name of the installation package profile.
-
In the field Gateway enter the server address, it can be viewed on the tab SSL VPN-Plus → Server Settings → IP Address.
-
In the field Port enter the server port, it can be viewed on the tab SSL VPN-Plus → Server Settings → Port.
-
Select the installation packages for the different operating systems. The Windows package is created by default and is always available.
-
Optional: To have the VPN client added to the autoloader on the remote machine, check the checkbox start client on logon (Windows only).
-
Optional: to create a VPN client icon on the desktop, check the checkbox create desktop icon (Windows only).
-
Optional: to validate the server certificate when connecting, check the checkbox server security certificate validation (Windows only).
-
Open the tab SSL VPN-Plus → IP Pools.
-
Click +.
-
In the field IP Range Specify the range of addresses that will be given to users when they connect.
-
In the field Netmask specify the network mask.
-
In the field Gateway Specify the gateway of the network.
-
Optional: configure DNS and WINS servers.
-
Open the tab Private Networks.
-
Click +.
-
In the field Network Add a local network to which remote users will have access.
-
In the field Send traffic select a way to send traffic:
- over tunnel — through the tunnel;
- bypass tunnel — directly bypassing the tunnel.
-
If you have selected the option to send traffic over tunneland check the box Enable TCP Optimization.
Connect the created installation package
- Open a web browser using the external address and port you set when you configured the Firewall.
- Enter the user credentials. After successful authorization, the list of created installation packages available for download will be opened.
- Download created installation package.
- Unzip the downloaded archive.
- Install the client.
- Start the client.
- In the authorization window, click Login.
- In the Certificate Validation window, click Yes.
- Enter the user's credentials.
Connect NSX L2 VPN
When moving to a different geographical location, the virtual machine will retain its IP addressing settings and will not lose connectivity with other machines in the same L2 domain as it. This feature can be used if there are two virtual machines located in different virtual data centers and regions.
The first VM has the address 10.10.10.2/24
and the second VM — 10.10.10.200/24
.
The linked broadcast domains must be built on the NSX platform. It is possible to use NSX Edge standalone, more details in VMware Customer Connect documentation (site registration is required to view).
-
From control panel open the Cloud Director panel: VMware-based cloud → Cloud Director.
-
Open the virtual data center page.
-
Go to the section Networking → Networks.
-
Click New.
-
Create a network with 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 tab Data Centers →Virtual Data Center.
-
Open the second virtual data center page.
-
Add a network with the same parameters.
Configure the NSX L2 VPN server
- From control panel open the Cloud Director panel: VMware-based cloud → Cloud Director.
- Open the virtual data center page.
- Go to the section Networking → Edges.
- Open the page of the desired Edge.
- Click Services.
- Open the tab VPN → L2VPN.
- Turn on the toggle switch L2VPN.
- In the field L2VPN mode select Server.
- On the tab Server Global enter the external IP address of the Egde router on which the tunnel port will be listened to. By default the socket will open on port 443, but this can be changed.
- Check the encryption settings for the tunnel.
- Open the tab Server Sites.
- Click +.
- Turn on the toggle switch Enabled.
- Enter the name of the feast.
- Enter the user's name and password.
- In the field Egress Optimization Gateway Address Enter the gateway address so that there is no IP address conflict, since the gateway of the created networks has the same address.
- Click Select sub-interfaces.
- Select the desired subinterface.
- Save the settings. The created client site will appear in the settings.
To configure the NSX L2 VPN client
- From control panel open the Cloud Director panel: VMware-based cloud → Cloud Director.
- Open the virtual data center page.
- Go to the section Networking → Edges.
- Open the page of the desired Edge.
- Click Services.
- Open the tab VPN → L2VPN.
- Turn on the toggle switch L2VPN.
- In the field L2VPN mode select Client.
- On the tab Client Global Specify the NSX Edge address and port of the first virtual data center that was specified in the fields Listening IP and Port on the server side.
- Configure encryption in the same way as on the server so that its settings are consistent when the tunnel is brought up.
- Click SELECT SUB-INTERFACES.
- Select the subinterface through which the tunnel for L2VPN will be built.
- In the field Egress Optimization Gateway Address enter the gateway address.
- In the field User Id enter a user name.
- In the field Password enter the password.
- In the field Confirm Password confirm the password.
- Save the settings.
- On any Edge router, under the tab Statistics → L2VPN check the tunnel.