GL-AR750 doesn't reboot if side switch is on "WIREGUARD ON" position

Hello. I am having a little trouble with Wireguard and the side switch. I am using AzireVPN without problems. I am using VPN policies also without problem. But as soon as I assign the function "Wireguard on/off"to the side switch and I try to make a reboot, the router just doen’t boot, it just sits there with the power light on. To make it boot again, I have to slide the switch on the “wireguard OFF” position, cut the power down and then turn it on again. Once booted, I can move the side switch and Wireguard tuns ON but then again I can’t reboot without moving the switch again and turning power off.
I am on firmware 3.027, tried 3.104 but I had to downgrade because DNS over TLS was not working at all.
I am also using the switch on GL-MT300N-V2 in the same way as the GL-AR750 and I never had a single problem in rebooting with Wireguard ON/OFF function.

Just update to firmware 3.105, same behaviour, no reboot with wireguard switch on left position (ON) and AzireVPN profile, but at least DNS over TLS is working now. This bug is really frustrating as I can’t really figure out what’s wrong.
Any ideas?

By reboot you mean reboot from the web panel?

If you pull the power and just power up again, does it boot?

Both. The only way to boot is temporary move the switch on right position (WG OFF), then I can boot. Or completely disable switch function, otherwise the router just freeze while booting with only the power led on.

Well, after the lastest release (3.105-1120) I decided to try NextDNS instead of Clodflare for DNS over TLS. Guess what? Finally AR750 correctly reboot and doesnt’ freeze when using Wireguard, VPN policies and the side switch function at the same time. The downside is that it requires at least 5-6 minutes to properly reboot. Weird, but at least now everything works finally.

This seems not normal either. Did you try without dns encryption or use other dns proxy service?

If it take too long to boot, generally means there is a power problem and the router need to boot several times to succeed. Can you try a different power adapter?

Hello and thanks. Tried 2 different adapters, no difference. As long as I am not assigning Wireguard ON/OFF to the side switch, the reboot process is fine using DNS over TLS (both Cloudflare & NextDNS) and even using Dnscrypt-proxy (Adguard).
But If I enable WG ON/OFF on the switch my system log is full of these messages during boot and extremely slow:
daemon.notice procd: /etc/rc.d/S21initswitch: Try again: de1.wg.azirevpn.net:51820'. Trying again in 1.00 seconds...

Thu Nov 26 13:08:31 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 1.00 seconds...
Thu Nov 26 13:08:37 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 1.20 seconds...
Thu Nov 26 13:08:41 2020 daemon.info dnsmasq-dhcp[4350]: DHCPDISCOVER(br-lan) 8c:45:00:f7:66:ae
Thu Nov 26 13:08:41 2020 daemon.info dnsmasq-dhcp[4350]: DHCPOFFER(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:08:41 2020 daemon.info dnsmasq-dhcp[4350]: DHCPREQUEST(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:08:41 2020 daemon.info dnsmasq-dhcp[4350]: DHCPACK(br-lan) 192.168.8.18 8c:45:00:f7:66:ae ABB_Inverter
Thu Nov 26 13:08:43 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 1.44 seconds...
Thu Nov 26 13:08:50 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 1.73 seconds...
Thu Nov 26 13:08:56 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 2.07 seconds...
Thu Nov 26 13:09:03 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 2.49 seconds...
Thu Nov 26 13:09:04 2020 daemon.info dnsmasq-dhcp[4350]: DHCPDISCOVER(br-lan) 8c:45:00:f7:66:ae
Thu Nov 26 13:09:04 2020 daemon.info dnsmasq-dhcp[4350]: DHCPOFFER(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:09:04 2020 daemon.info dnsmasq-dhcp[4350]: DHCPREQUEST(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:09:04 2020 daemon.info dnsmasq-dhcp[4350]: DHCPACK(br-lan) 192.168.8.18 8c:45:00:f7:66:ae ABB_Inverter
Thu Nov 26 13:09:11 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 2.99 seconds...
Thu Nov 26 13:09:19 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 3.58 seconds...
Thu Nov 26 13:09:27 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 4.30 seconds...
Thu Nov 26 13:09:28 2020 daemon.info dnsmasq-dhcp[4350]: DHCPDISCOVER(br-lan) 8c:45:00:f7:66:ae
Thu Nov 26 13:09:28 2020 daemon.info dnsmasq-dhcp[4350]: DHCPOFFER(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:09:28 2020 daemon.info dnsmasq-dhcp[4350]: DHCPREQUEST(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:09:28 2020 daemon.info dnsmasq-dhcp[4350]: DHCPACK(br-lan) 192.168.8.18 8c:45:00:f7:66:ae ABB_Inverter
Thu Nov 26 13:09:30 2020 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED 8c:88:2b:00:04:24
Thu Nov 26 13:09:30 2020 daemon.info hostapd: wlan0: STA 8c:88:2b:00:04:24 IEEE 802.11: disassociated
Thu Nov 26 13:09:37 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 5.16 seconds...
Thu Nov 26 13:09:42 2020 daemon.info hostapd: wlan0: STA 8c:88:2b:00:04:24 IEEE 802.11: authenticated
Thu Nov 26 13:09:42 2020 daemon.info hostapd: wlan0: STA 8c:88:2b:00:04:24 IEEE 802.11: associated (aid 1)
Thu Nov 26 13:09:42 2020 daemon.notice hostapd: wlan0: AP-STA-CONNECTED 8c:88:2b:00:04:24
Thu Nov 26 13:09:42 2020 daemon.info hostapd: wlan0: STA 8c:88:2b:00:04:24 RADIUS: starting accounting session 0886528256B7AACE
Thu Nov 26 13:09:42 2020 daemon.info hostapd: wlan0: STA 8c:88:2b:00:04:24 WPA: pairwise key handshake completed (RSN)
Thu Nov 26 13:09:42 2020 daemon.info dnsmasq-dhcp[4350]: DHCPREQUEST(br-lan) 192.168.8.100 8c:88:2b:00:04:24
Thu Nov 26 13:09:42 2020 daemon.info dnsmasq-dhcp[4350]: DHCPACK(br-lan) 192.168.8.100 8c:88:2b:00:04:24 MASSIMO-PC
Thu Nov 26 13:09:47 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 6.19 seconds...
Thu Nov 26 13:09:52 2020 daemon.info dnsmasq-dhcp[4350]: DHCPDISCOVER(br-lan) 8c:45:00:f7:66:ae
Thu Nov 26 13:09:52 2020 daemon.info dnsmasq-dhcp[4350]: DHCPOFFER(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:09:52 2020 daemon.info dnsmasq-dhcp[4350]: DHCPREQUEST(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:09:52 2020 daemon.info dnsmasq-dhcp[4350]: DHCPACK(br-lan) 192.168.8.18 8c:45:00:f7:66:ae ABB_Inverter
Thu Nov 26 13:09:58 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 7.43 seconds...
Thu Nov 26 13:10:11 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 8.92 seconds...
Thu Nov 26 13:10:15 2020 daemon.info dnsmasq-dhcp[4350]: DHCPDISCOVER(br-lan) 8c:45:00:f7:66:ae
Thu Nov 26 13:10:15 2020 daemon.info dnsmasq-dhcp[4350]: DHCPOFFER(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:10:15 2020 daemon.info dnsmasq-dhcp[4350]: DHCPREQUEST(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:10:15 2020 daemon.info dnsmasq-dhcp[4350]: DHCPACK(br-lan) 192.168.8.18 8c:45:00:f7:66:ae ABB_Inverter
Thu Nov 26 13:10:24 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 10.70 seconds...
Thu Nov 26 13:10:36 2020 user.err ddns-scripts[3403]: glddns: cURL Error: '6'
Thu Nov 26 13:10:36 2020 user.warn ddns-scripts[3403]: glddns: Transfer failed - retry 1/0 in 60 seconds
Thu Nov 26 13:10:39 2020 daemon.info dnsmasq-dhcp[4350]: DHCPDISCOVER(br-lan) 8c:45:00:f7:66:ae
Thu Nov 26 13:10:39 2020 daemon.info dnsmasq-dhcp[4350]: DHCPOFFER(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:10:39 2020 daemon.info dnsmasq-dhcp[4350]: DHCPREQUEST(br-lan) 192.168.8.18 8c:45:00:f7:66:ae
Thu Nov 26 13:10:39 2020 daemon.info dnsmasq-dhcp[4350]: DHCPACK(br-lan) 192.168.8.18 8c:45:00:f7:66:ae ABB_Inverter
Thu Nov 26 13:10:40 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'. Trying again in 12.84 seconds...
Thu Nov 26 13:10:58 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Try again: `de1.wg.azirevpn.net:51820'
Thu Nov 26 13:10:58 2020 daemon.notice procd: /etc/rc.d/S21initswitch: Configuration parsing error

I see. This is because initswitch is a start script and it will stuck the boot process.

In this case, this needs to be optimized.

Can you try modify /etc/init.d/initswitch, adding “&” at this line.

image

1 Like

Finally… YES! That did the trick! Everything now works as expected! Thank you so much!

On a side note, enabling the switch on my Mango now also give me problems on reboot: boot time are normal, but if the switch is on WG ON position, Wireguard connection fails everytime and there’s no internet: I have to reconnect manually from the UI, making switch option useless. System log seems normal in this case, so I have no clue what’s happening. Anyway, thanks again!

Aaahhh, with latest firmware (3.203-0701), this problem is present again. Firts of all I saw that the “&” after “/etc/init.d/initswitch” is now present by default… Anyway, the router reboots but there’s no way it connects to wireguard, there is simply no connection and stopping Wireguard and trying to reconnect to it again fails everytime. Disabling the switch function make the router correctly connect to wireguard upon reboot…