A1300 wireguard config fail

I can’t get it to connect. My config file is (keys modified):

[Interface]
Address = 10.5.0.2/32
ListenPort = 6193
PrivateKey = xxxxxxxxxxxxxxxxxxxxxx

[Peer]
AllowedIPs = 0.0.0.0/0
Endpoint = 185.240.244.195:51820
PersistentKeepalive = 25
PublicKey = xxxxxxxxxxxxxxxxxxxxxxx

But when enabled, it hangs while connecting with this single line in the log file:

daemon.notice netifd: Interface ‘wgclient’ is setting up now

Any ideas?

I’m having the same issue after upgrading my firmware to 4.1.1
What firmware version are you using?

The firmware is 4.1.2

Tried firmware 4.2 (snapshot) and 4.0 (factory reset) with no change in result. Log from test with 4.0 below:

Fri Jan 6 15:20:26 2023 daemon.notice netifd: Interface ‘wgclient’ is setting up now
Fri Jan 6 15:20:26 2023 daemon.info dnsmasq[11784]: exiting on receipt of SIGTERM
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: Connected to system UBus
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: started, version 2.85 cachesize 150
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: DNS service limited to local subnets
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth cryptohash DNSSEC no-ID loop-detect inotify dumpfile
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: UBus support enabled: connected to system bus
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq-dhcp[1559]: DHCP, IP range 192.168.9.100 – 192.168.9.249, lease time 12h
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq-dhcp[1559]: DHCP, IP range 192.168.8.100 – 192.168.8.249, lease time 12h
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain test
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain onion
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain localhost
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain local
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain invalid
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain bind
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain lan
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: reading /tmp/resolv.conf.d/resolv.conf.auto
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain test
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain onion
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain localhost
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain local
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain invalid
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain bind
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using only locally-known addresses for domain lan
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: using nameserver 192.168.42.129#53
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: read /etc/hosts - 4 addresses
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq[1559]: read /tmp/hosts/dhcp.cfg01411c - 3 addresses
Fri Jan 6 15:20:33 2023 daemon.info dnsmasq-dhcp[1559]: read /etc/ethers - 0 addresses
Fri Jan 6 15:23:19 2023 daemon.info dnsmasq-dhcp[1559]: DHCPREQUEST(br-lan) 192.168.8.153 e4:95:6e:44:26:10
Fri Jan 6 15:23:19 2023 daemon.info dnsmasq-dhcp[1559]: DHCPACK(br-lan) 192.168.8.153 e4:95:6e:44:26:10 GL-MT300N-V2-610
Fri Jan 6 15:27:43 2023 daemon.info dnsmasq[1559]: exiting on receipt of SIGTERM
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: Connected to system UBus
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: started, version 2.85 cachesize 150
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: DNS service limited to local subnets
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth cryptohash DNSSEC no-ID loop-detect inotify dumpfile
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: UBus support enabled: connected to system bus
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq-dhcp[14850]: DHCP, IP range 192.168.9.100 – 192.168.9.249, lease time 12h
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq-dhcp[14850]: DHCP, IP range 192.168.8.100 – 192.168.8.249, lease time 12h
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: using only locally-known addresses for domain test
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: using only locally-known addresses for domain onion
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: using only locally-known addresses for domain localhost
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: using only locally-known addresses for domain local
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: using only locally-known addresses for domain invalid
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: using only locally-known addresses for domain bind
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: using nameserver 103.86.99.100#53
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: using nameserver 103.86.96.100#53
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: using only locally-known addresses for domain lan
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: read /etc/hosts - 4 addresses
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq[14850]: read /tmp/hosts/dhcp.cfg01411c - 3 addresses
Fri Jan 6 15:27:51 2023 daemon.info dnsmasq-dhcp[14850]: read /etc/ethers - 0 addresses

Can you try it in 4.2.0?

Ok I tried again with the beta firmware in your link. No change. Attached is the latest log file along with an image of the config file. Thanks.


@hansome Please note that this bug does not appear to be the same as the one on sft1200 4.1.
The 4.2.0 version does not fix it.

Hi,

What device do you use as the wireguard server? if its port 51820 is accessible? maybe blocked by firewall, please check.

Can we start a remote desktop session to debug? please PM me.

I opened port 51820 on the router (A1300). No change.

Ok I proved there is nothing wrong with the firmware. The attached log file shows a successful connection. Could you please look and tell me what is different with this server? I need to use a different server but this is the only one that connects. Thanks.

Final solution - I was extracting the server public key incorrectly. So my config files were incorrect. This caused the router to hang while attempting to connect to the server.

1 Like