How to use OpenVPN to access your home network through the Wi-Fi Routers

Este artículo se aplica a:

In the OpenVPN connection, the home network can act as a server, and the remote device can access the server through the router, which acts as an OpenVPN Server gateway. To use the VPN feature, you should enable OpenVPN Server on your router and install and run VPN client software on the remote device. Please follow the steps below to set up an OpenVPN connection.

 

Case 1: Only one router in the home network map

The network map and the VPN server connect the cable modem to connect the internet.

Step1. Set up OpenVPN Server on Your Router

1. Log in to the web-based interface of the router. If you don’t know how to do that, please refer to

How to log into the web-based interface of the MERCUSYS Wireless AC/AX Router?

2. Go to Advanced > VPN Server > OpenVPN, and select Enable VPN Server.

The OpenVPN button, Service Type, Service Port, Netmask and Client Access.

Note:

  • Before you enable VPN Server, we recommend you configure Dynamic DNS Service (recommended) or assign a static IP address for the router’s WAN port and synchronize your System Time with the internet.
  • For the CG-NAT ISP: Comporium and Direct link - radio service, provide the customer a private IP, which will cause you can't use the OpenVPN and affect the NAT Type. You can contact the ISP and ask them to offer a Statis IP address.
  • The first time you configure the OpenVPN Server, you may need to Generate a certificate before you enable the VPN Server.

3. Select the Service Type (communication protocol) for OpenVPN Server: UDP, TCP.

4. Enter a Service Port to which a VPN device connects, and the port number should be between 1024 and 65535.

5. In the Netmask fields, enter the range of IP addresses that can be leased to the device by the OpenVPN server.

6. Select your Client Access type. Select Home Network Only if you only want the remote device to access your home network; select Internet and Home Network if you also want the remote device to access the Internet through the VPN Server.

7. Click Save.

8. Click Generate to get a new certificate.

The certificate and generate button.

Note:

If you have already generated one, please skip this step, or click Generate to update the certificate.

9. Click Export to save the OpenVPN configuration file, which will be used by the remote device to access your router.

The configuration file and the export button.

 

Step 2. Configure OpenVPN Connection on Your Remote Device

1. Visit http://openvpn.net/index.php/download/community-downloads.html to download the OpenVPN software and install it on your device where you want to run the OpenVPN client utility.

Note:

You need to install the OpenVPN client utility on each device on which you plan to apply the VPN function to access your router. Mobile devices should download a third-party app from Google Play or Apple App Store.

2. After the installation, copy the file exported from your router to the OpenVPN client utility’s “config” folder (for example, C:\Program Files\OpenVPN\config on Windows). The path depends on where the OpenVPN client utility is installed.

3. Run the OpenVPN client utility and connect it to OpenVPN Server.

 

Case 2: Two or more routers in the home network map

The network map and the VPN server connect the modem router to connect the internet.

 

Step1. Set up OpenVPN Server on Your Router

1. Log in to the web-based interface of the router. If you don’t know how to do that, please refer to

How to log into the web-based interface of the MERCUSYS Wireless AC/AX Router?

2. Go to Advanced > VPN Server > OpenVPN, and select Enable VPN Server.

The OpenVPN button, Service Type, Service Port, Netmask, and Client Access.

Note:

• Before you enable the VPN Server, we recommend you configure Dynamic DNS Service (recommended) or assign a static IP address for the router's WAN port and synchronize your System Time with the internet.

• The first time you configure the OpenVPN Server, you may need to Generate a certificate before you enable the VPN Server.

3. Select the Service Type (communication protocol) for OpenVPN Server: UDP, TCP.

4. Enter a Service Port to which a VPN device connects, and the port number should be between 1024 and 65535. Please write down the Service Port.

5. In the Netmask fields, enter the range of IP addresses that can be leased to the device by the OpenVPN server.

6. Select your Client Access type. Select Home Network Only if you only want the remote device to access your home network; select Internet and Home Network if you also want the remote device to access the Internet through the VPN Server.

7. Click Save.

8. Click Generate to get a new certificate.

The certificate and generate button.

Note:

If you have already generated one, please skip this step or click Generate to update the certificate.

9. Click Export to save the OpenVPN configuration file, which will be used by the remote device to access your router.

The configuration file and the export button.

10. Set up Virtual Server/Port Forwarding for Router 2 on Modem Router/Router 1, please refer to

Port forwarding: how to set up virtual server on Mercusys wireless router? 

Note:

  1. Please make sure the Internal Port is the same as the VPN Service Port you wrote down before.
  2. Enter and write down the External Port.

11. Go to the Management Interface of the Modem Router/Router1, and write down the WAN IP address.

12. Right-click the OpenVPN configuration file and open it with the Notepad.

Please modify the following two characters:

  1. Modify the remote address to the WAN IP address of the Modem Router/Router1 you wrote down in Step 11.
  2. Modify the Port number to the External Port you set for Router2 in Step 10.

The OpenVPN-Config file and the IP address.

13. Save the OpenVPN configuration file.

Step 2. Configure OpenVPN Connection on Your Remote Device

1. Visit http://openvpn.net/index.php/download/community-downloads.html to download the OpenVPN software and install it on your device where you want to run the OpenVPN client utility.

Note:

You need to install the OpenVPN client utility on each device on which you plan to apply the VPN function to access your router. Mobile devices should download a third-party app from Google Play or Apple App Store.

2. After the installation, copy the file exported from your router to the OpenVPN client utility’s “config” folder (for example, C:\Program Files\OpenVPN\config on Windows). The path depends on where the OpenVPN client utility is installed.

3. Run the OpenVPN client utility and connect it to OpenVPN Server.