In this guide, you will learn how to set up up a WireGuard® connection on your GL.iNet router.
To proceed, you will need a router, a computer, and an active Surfshark subscription. If you don’t have one yet, take a look at Surfshark plans.
Here are the steps that we will go through:
- Get your key pair
- I have a key pair
- I don't have a key pair
- Choose a server
- Configure the interface
- Ensure the connection is successful
Get your key pair
There are two ways we can go from here – either you already have generated a key pair, and you'll be able to use it, or we will have to generate one. If you do have a key pair already, continue the tutorial as usual, and if you do not have one – click here.
I have a key pair
- Go to this page, choose the Router option, and click on WireGuard.
- In the next window, click on I have a key pair.
- Enter your public key and hit Save.
I don't have a key pair
- Go to this page, choose the Router option, and click on WireGuard.
- In the next window, click on I don't have a key pair.
- Click on Generate a new key pair.
Note: Once the key pairs are generated, copy them and store them on your device, as you will not be able to check them again.
Choose a server
Once you have your key pair, you'll be able to see a Choose a location button. Once you click on it, you'll be greeted with the full list of available locations to connect to. Select one and hit the download button.
Configure the interface
- Now, connect to your router's web interface. You will have to paste your router's gateway IP address into the URL bar of the browser of your choice. By default, it is 192.168.8.1. Also, if you have not configured it before, the username and password should be admin. If that does not work, you'll be able to find the password on the label of your router.
-
Next up, look for the VPN option and select WireGuard. After, click on Set up WireGuard manually.
Once there, you should be able to see a window like so:
-
Enter the Configuration section, and simply paste in the contents from the server configuration file you have downloaded in the Choose a server section. You can open the server configuration file by using a text editing software of your choice, such as Notepad.
You must make sure that your private key is inserted in the required section below:
[Interface]
Address = server's IP address
PrivateKey = <insert_your_private_key_here> ← Insert your private key here
DNS = 162.252.172.57, 149.154.159.92
[Peer]
PublicKey = server's public key
AllowedIPs = 0.0.0.0/0
Endpoint = server's endpoint address
-
Once you are done, press Next, and then you can save the configuration made. You’ll also be able to view the finished configuration, which will look similar to this:
You’ll also find that you can view the connection status like so:
Ensure the connection is successful
We always recommend checking if Surfshark VPN is working after setting it up for the first time. You can easily do it by performing Surfshark IP leak test and a DNS leak test. For your convenience, both are available on our website.
You may also be interested in: