How to set up an OpenVPN server on a GL.iNet router¶
This tutorial will show you how to set up an OpenVPN server on a GL.iNet router. A VPN server allows you to establish a secure connection to your home or office network remotely. With a GL.iNet router, you can set up your OpenVPN server in minutes.
Before you start, make sure to check the following requirements:
A public IP address
Setting up an OpenVPN server requires a public IP address. To check if you have one, follow these steps.
Port forwarding
If your GL.iNet router is connected to a primary router, you will have to set up port forwarding on the primary router.
1. Sign in to your router¶
In a web browser, enter the URL to your router admin panel (e.g., 192.168.8.1). Enter your password, then click Login.
2. Set up Dynamic DNS (optional)¶
Setting up an OpenVPN server requires a static public IP address, which provdes a fixed address for your VPN server to be accessible to other devices. In most cases, you may not have a static public IP address. This requires setting up Dynamic DNS on your GL.iNet router. It allows you to connect to the OpenVPN server even if your public IP address is dynamic (instead of static) and changes constantly.
To set up Dynamic DNS, follow these steps:
- In the left sidebar, click Applications > Dynamic DNS.
- Next to Enable DDNS, toggle the switch to on.
- Check the box for I have read and agree to the Terms of Service & Privacy Policy.
- Click Apply.
3. Download the configuration file¶
- In the left sidebar, click VPN > OpenVPN Server.
- Click Generate Configuration.
- Keep the default settings as-is, then click Export Client Configuration.
- If you set up Dynamic DNS previously, toggle the switch to on for Use DDNS Domain.
- Click Download, then save the file.
- At the top, click Start.
(Optional) To access the local network of the VPN server, enable these settings:
- In the left sidebar, click VPN > VPN Dashboard.
- Click the Options icon.
- Toggle the switch to on for Remote Access LAN.
- Click Apply.
4. Connect to the OpenVPN server¶
To connect to the OpenVPN server, you will need an OpenVPN client. You can set it up by using one of these methods below:
Method 1: A third-party OpenVPN client app (Use this method if you don't have an additional router that supports setting up an OpenVPN client)
In this tutorial, we will use the OpenVPN Connect app, the official app developed by OpenVPN Inc, as an example.
- On another device, connect to a different Wi-Fi network (or connect to cellular if you are using a mobile device.)
- Send the configuration file you downloaded earlier (e.g., by email) to the device, then download the file to it.
- Download OpenVPN Connect for your device operating system:
- In the app, read the terms and conditions, then select Agree.
- Select Upload File.
- Select Browse, then select the configuration file you downloaded previously.
- Select OK.
- Select Connect > OK > Allow.
You will see the word "Connected" at the top of the VPN profile.
Method 2: A router that supports setting up an OpenVPN client
You can use any routers that support setting up the OpenVPN client manual configuration. In this tutorial, we will use GL.iNet's travel router Beryl AX (GL-MT3000) as an example.
- On another device, connect to a different Wi-Fi network (or connect to cellular if you are using a mobile device.).
- In a web browser's address, enter the URL to your router admin panel (e.g., 192.168.8.1).
- Enter your password, then click Login.
- In the left sidebar, click VPN > OpenVPN Client.
- Click Add Manually.
- Enter a name in the field, then click the check icon.
- Upload the configuration file you downloaded earlier.
- Click Apply.
- Click the three-dot icon, then click Start.
- Connect a device to the router running the OpenVPN client.
5. Check if you are connected successfully¶
To check if you are connected to the OpenVPN server successfully, look up your IP address online. If it matches the one provided by your internet service provider to your network, you are connected to the OpenVPN server successfully.
Still have questions? Visit our Community Forum.