How to set up WireGuard® on GL.iNet router(3.x firmware)

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:

  1. Get your key pair
  2. I have a key pair
  3. I don't have a key pair
  4. Choose a server
  5. Configure the interface
  6. 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

  1. Go to this page, choose the Router option, and click on WireGuard.

  2. In the next window, click on I have a key pair.

  3. Enter your public key and hit Save.


I don't have a key pair

  1. Go to this page, choose the Router option, and click on WireGuard.

  2. In the next window, click on I don't have a key pair.

  3. 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

  1. 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 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.

  2. 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:

  3. 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:


    Address = server's IP address
    PrivateKey = <insert_your_private_key_here>  ← Insert your private key here
    DNS =,

    PublicKey = server's public key
    AllowedIPs =

    Endpoint = server's endpoint address
  4. 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:

  1. How to set up OpenVPN on GL.iNet router(3.x firmware)
  2. How to set up VPN on my Smart TV or console
  3. How to set up a VPN-protected Wi-Fi hotspot using Windows
Was this article helpful?
Thank you for your feedback!