Router restart ends up with wireguard connection issue

Introduction
I have multiple ER605 running. All of them are connected to a wireguard vpn server, which is hosted on an ubuntu server in the cloud. The ER605 are all behind a CG-NAT and so they are actively connecting to the cloud server.
Setup
Site A holds the controller and connects to a wireguard server in the cloud
Site B connects to the wireguard server in the cloud
Site B uses the controller at Site A
Problem
If the ER605 restarts, for example because of losing power or someone at the site think it is a good idea to reset the router, it connects to whatever WAN setup is made. From PPPoE over DHCP, everything is working. The only thing, which is not connecting is the wireguard connection. The router does not connect until I turn off and on the wireguard setup on the ER605 at the specific site OR (and this is really interesting) I restart the wireguard service on the wireguard server in the cloud.
I except that the ER605 connects to the wireguard server after the restart and I don't want to disable and enable the service on the ER605 and I also don't want to restart the wireguard service on the server.
In this specific setup I only can restart the wireguard service at the wireguard server, because the ER605 needs the connection to get updates from the controller.
There is also a non ER605 router in this setup and this device (pfSense) connects to the wireguard server after a restart. Only the ER605 router does not connect after a restart.
Question
Is anyone having the same problem, that the wireguard service from the ER605 does not connect automatically after reboot?
greets, Odin
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
Yes, but it is more a workaround. I monitored the wireguard connection and if the connection has been lost for about 5 minutes, i restart the wireguard connection on the server side with just systemctl restart wg-quick@your-wg and the connection goes up. If you don't want to have this automatically, you can do this by hand. Just bring this connection up again.
The next thing is TP-Link resolved this issue a few months ago. Sorry for not replying.
(Because of some changes on my side, I have to change my username - @Odin_ygg is the old one)
greets from austria, olli
- Copy Link
- Report Inappropriate Content

- Copy Link
- Report Inappropriate Content
thanks for your fast reply, but the solution you recommended does not fit my scenario. The problem here is not that the router is restarting. The problem is that the router does not connect to the wireguard server as long as the service has not been resetted. Just the service has to be resetted, every other thing is doing well.
I will give it a try with some packet trace and I hope to see the problem.
- Copy Link
- Report Inappropriate Content
@Odin_ygg Did you ever find a solution for this? I'm having the same problem with the TL-WR1502X.
- Copy Link
- Report Inappropriate Content
Yes, but it is more a workaround. I monitored the wireguard connection and if the connection has been lost for about 5 minutes, i restart the wireguard connection on the server side with just systemctl restart wg-quick@your-wg and the connection goes up. If you don't want to have this automatically, you can do this by hand. Just bring this connection up again.
The next thing is TP-Link resolved this issue a few months ago. Sorry for not replying.
(Because of some changes on my side, I have to change my username - @Odin_ygg is the old one)
greets from austria, olli
- Copy Link
- Report Inappropriate Content
chattin wrote
@Odin_ygg Did you ever find a solution for this? I'm having the same problem with the TL-WR1502X.
His question deviated from the original topic. In the previous reply, there was an issue where the WG would crash the system due to the config.
If it is the problem "not able to connect", then you have to troubleshoot to ensure you have the proper settings.
Wireguard is not gonna be easy for a starter who has not used a VPN previously.
- Copy Link
- Report Inappropriate Content
@Clive_A
I think the problem comes down to DNS not being ready before Wireguard attempts to connect.
Instead of using a url as my endpoint address, I tried with the IP that the url resolves to - it works, and automatically reconnects after reboot.
The URL will work, but only if triggered/toggled manually after boot.
I've manually set the DNS to 8.8.8.8/1.1.1.1, but the issue persists, so I'm guessing that the Wireguard service just initializes before DNS.
Thoughts? Any way to fix? Thanks.
- Copy Link
- Report Inappropriate Content
chattin wrote
@Clive_A
I think the problem comes down to DNS not being ready before Wireguard attempts to connect.
Instead of using a url as my endpoint address, I tried with the IP that the url resolves to - it works, and automatically reconnects after reboot.
The URL will work, but only if triggered/toggled manually after boot.
I've manually set the DNS to 8.8.8.8/1.1.1.1, but the issue persists, so I'm guessing that the Wireguard service just initializes before DNS.
Thoughts? Any way to fix? Thanks.
I don't think Wireguard or OVPN can resolve the FQDN. That is a request that is known.
- Copy Link
- Report Inappropriate Content
See that's the thing - it does work with FQDN when the VPN is toggled on manually, it just doesn't reconnect automatically after reboot.
I've opted to go a different direction, so this is no longer an issue for me, but hopefully this is something that can resolved regardless for other users.
- Copy Link
- Report Inappropriate Content

chattin wrote
See that's the thing - it does work with FQDN when the VPN is toggled on manually, it just doesn't reconnect automatically after reboot.
I've opted to go a different direction, so this is no longer an issue for me, but hopefully this is something that can resolved regardless for other users.
It worked, which could be because the FQDN is resolved and cached.
I assume the solution for this issue is that the FQDN after the reboot should be resolved by the DNS, instead of by the cache.
The FQDN feature is pending being added(FQDN for OVPN and WG available in the new adaptation from the Pre-Release).
- Copy Link
- Report Inappropriate Content
Good evening @Clive_A
I am running two ER706W v1.20 and they have actually the same problem the ER605 does have a few months ago. If one of the routers restarts, they don't bring up the Wireguard connection until I restart the wg interface on the Wireguard server. I have not used FQDN, just a static IP address.
I think the problem got solved with some firmware at the ER605 but the ER706W has this issue at the moment.
Maybe you can give some bug report to the development team?
- Copy Link
- Report Inappropriate Content

Information
Helpful: 0
Views: 907
Replies: 10
Voters 0
No one has voted for it yet.