Setting up Wireguard on gl-mt300n-v2


#1

I want to configure Wireguard on my gl-mt300n-v2 router running firmware 3.012.

My vpn provider gave me the following configuration file, but the router doesn’t recognize it, and I’m not sure what exactly I should put in to add the fields manually. Also according to my provider the listen port should be random. Can anyone help with the config? Thanks!

[Interface]
PrivateKey = XXX=
Address = 11.11.11.11/16
DNS = 11.11.11.11

[Peer]
PublicKey = YYY=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = somewebsite.net:51820
PersistentKeepalive = 25


#2

When you copy and paste the content to the UI (plain text), what does the UI say?

Maybe you can edit the line of AllowedIPs to the following and try again.

AllowedIPs = 0.0.0.0/0

#3

I was getting the error “Invalid Port Number”
It looks like the original values for AllowedIPs was fine. I was able to get it working by adding:

ListenPort = 84

to the Interface section. According to my provider, this shoud be blank (or whatever setting makes the port random), but setting it to 84 seems to have worked for now.


#4

@kyson-lok pls check if port number can be removed from parameter check.


#5

It is a bug for old firmware. It had been fixed.


#6

I’m running firmware 3.012. Do you recommend getting the beta of 3.022?


#7

For anyone else who is running into to same problem, the 3.022 firmware did solve the problem of being able to use the config file (having a random port assigned). It also fixed other problems in the wireguard implementation that were causing connection problems with some websites.