Hello,
I have a wireguard connection from my Raspberry Pi (server) to a GL-MV1000 / Brume (client).
Every morning the Brume loses the connection to the Raspberry Pi. After I reconnected Wireguard with the mode switch on the side, the connection works again.
I have to repeat this procedure every day.
Can someone please explain how I can solve this problem?
alzhao
September 7, 2020, 1:01pm
2
Can you share logs of your mv1000
System log or Kernel log?
alzhao
September 7, 2020, 2:18pm
4
System log should be fine.
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Rule ‘Allow-IPSec-ESP’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Rule ‘Allow-ISAKMP’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Rule ‘Allow-Wireguard’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Forward ‘wireguard’ → ‘wan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Forward ‘wireguard’ → ‘lan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Forward ‘lan’ → ‘wireguard’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘lan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wireguard’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Populating IPv4 nat table
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘lan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wireguard’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Populating IPv4 mangle table
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘lan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wireguard’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Populating IPv4 raw table
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘lan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: - Using automatic conntrack helper attachment
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wan’
Mon Sep 7 12:06:59 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wireguard’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Clearing IPv6 filter table
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Clearing IPv6 mangle table
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Populating IPv6 filter table
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Rule ‘Allow-DHCPv6’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Rule ‘Allow-MLD’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Rule ‘Allow-ICMPv6-Input’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Rule ‘Allow-ICMPv6-Forward’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Rule ‘Allow-IPSec-ESP’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Rule ‘Allow-ISAKMP’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Forward ‘wireguard’ → ‘wan’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Forward ‘wireguard’ → ‘lan’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Forward ‘lan’ → ‘wireguard’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘lan’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wan’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wireguard’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Populating IPv6 mangle table
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘lan’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wan’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Zone ‘wireguard’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Flushing conntrack: 10.6.0.3
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Set tcp_ecn to off
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Set tcp_syncookies to on
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Set tcp_window_scaling to on
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Running script ‘/etc/firewall.user’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: uci: Entry not found
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: uci: Entry not found
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: iptables: No chain/target/match by that name.
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: iptables: No chain/target/match by that name.
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: ipset v7.3: The set with the given name does not exist
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Running script ‘/usr/bin/glfw.sh’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Running script ‘/var/etc/gls2s.include’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: ! Skipping due to path error: No such file or directory
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Running script ‘/usr/sbin/glqos.sh’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: * Running script ‘/var/etc/mwan3.include’
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: /sbin/uci: Invalid argument
Mon Sep 7 12:07:00 2020 daemon.notice procd: /etc/rc.d/S99wireguard: /sbin/uci: Invalid argument
Mon Sep 7 12:07:01 2020 daemon.notice procd: /etc/rc.d/S99wireguard: uci: Entry not found
Mon Sep 7 12:07:01 2020 daemon.notice procd: /etc/rc.d/S99wireguard: uci: Entry not found
alzhao
September 7, 2020, 2:33pm
6
I mean, you post the full log before you reconnect.
Ok, then I post it tomorrow. Thank you
Mon Sep 7 15:48:18 2020 kern.info kernel: [13339.074023] mv88e6085 d0032004.mdio-mii:01 lan1: Link is Down
Mon Sep 7 15:48:18 2020 kern.info kernel: [13339.080041] br-lan: port 2(lan1) entered disabled state
Mon Sep 7 15:48:18 2020 daemon.notice netifd: Network device ‘lan1’ link is down
Mon Sep 7 15:48:18 2020 daemon.notice netifd: Interface ‘lan1’ has link connectivity loss
Mon Sep 7 15:48:18 2020 daemon.notice netifd: Interface ‘lan1’ is now down
Mon Sep 7 19:07:23 2020 daemon.info dnsmasq-dhcp[14336]: DHCPREQUEST(br-lan) 192.168.8.226 48:b0:2d:15:54:a0
Mon Sep 7 19:07:23 2020 daemon.info dnsmasq-dhcp[14336]: DHCPACK(br-lan) 192.168.8.226 48:b0:2d:15:54:a0
Tue Sep 8 01:07:24 2020 daemon.info dnsmasq-dhcp[14336]: DHCPREQUEST(br-lan) 192.168.8.226 48:b0:2d:15:54:a0
Tue Sep 8 01:07:24 2020 daemon.info dnsmasq-dhcp[14336]: DHCPACK(br-lan) 192.168.8.226 48:b0:2d:15:54:a0
Tue Sep 8 07:03:48 2020 kern.info kernel: [68268.613367] mv88e6085 d0032004.mdio-mii:01 lan1: Link is Up - 1Gbps/Full - flow control rx/tx
Tue Sep 8 07:03:48 2020 kern.info kernel: [68268.622543] br-lan: port 2(lan1) entered blocking state
Tue Sep 8 07:03:48 2020 kern.info kernel: [68268.628077] br-lan: port 2(lan1) entered forwarding state
Tue Sep 8 07:03:48 2020 daemon.notice netifd: Network device ‘lan1’ link is up
Tue Sep 8 07:03:48 2020 daemon.notice netifd: Interface ‘lan1’ has link connectivity
Tue Sep 8 07:03:48 2020 daemon.notice netifd: Interface ‘lan1’ is setting up now
Tue Sep 8 07:03:48 2020 daemon.notice netifd: Interface ‘lan1’ is now up
Tue Sep 8 07:03:48 2020 daemon.info dnsmasq[14336]: read /etc/hosts - 4 addresses
Tue Sep 8 07:03:48 2020 daemon.info dnsmasq[14336]: read /tmp/hosts/odhcpd - 0 addresses
Tue Sep 8 07:03:48 2020 daemon.info dnsmasq[14336]: read /tmp/hosts/dhcp.cfg01411c - 3 addresses
Tue Sep 8 07:03:48 2020 daemon.info dnsmasq-dhcp[14336]: read /etc/ethers - 0 addresses
Tue Sep 8 07:03:53 2020 daemon.info dnsmasq-dhcp[14336]: DHCPDISCOVER(br-lan) 192.168.8.127 00:26:2d:bf:32:0d
Tue Sep 8 07:03:53 2020 daemon.info dnsmasq-dhcp[14336]: DHCPOFFER(br-lan) 192.168.8.127 00:26:2d:bf:32:0d
Tue Sep 8 07:03:53 2020 daemon.info dnsmasq[14336]: read /etc/hosts - 4 addresses
Tue Sep 8 07:03:53 2020 daemon.info dnsmasq[14336]: read /tmp/hosts/odhcpd - 1 addresses
Tue Sep 8 07:03:53 2020 daemon.info dnsmasq[14336]: read /tmp/hosts/dhcp.cfg01411c - 3 addresses
Tue Sep 8 07:03:53 2020 daemon.info dnsmasq-dhcp[14336]: read /etc/ethers - 0 addresses
Tue Sep 8 07:03:53 2020 daemon.info dnsmasq-dhcp[14336]: DHCPREQUEST(br-lan) 192.168.8.127 00:26:2d:bf:32:0d
Tue Sep 8 07:03:53 2020 daemon.info dnsmasq-dhcp[14336]: DHCPACK(br-lan) 192.168.8.127 00:26:2d:bf:32:0d DESKTOP-QUJ7HIN
Tue Sep 8 07:07:24 2020 daemon.info dnsmasq-dhcp[14336]: DHCPREQUEST(br-lan) 192.168.8.226 48:b0:2d:15:54:a0
Tue Sep 8 07:07:24 2020 daemon.info dnsmasq-dhcp[14336]: DHCPACK(br-lan) 192.168.8.226 48:b0:2d:15:54:a0
In this status, where is no connection on (VPN → Wireguard clients). Here I can only press abort. Usually it says disconnect or connect.
alzhao
September 8, 2020, 8:41am
10
This seems suspicious. What is lan1?
At this point I probably just plugged my laptop into lan 1 to see the log. Usually there is an Nvidia shield on lan 1
I found the cause, it is because my ISP is forced to disconnect every 24 hours.
Since the system is based on UDP, Wireguard will not notice the connection abort after the IP change by your ISP and accordingly will not initiate a new connection.
Is there a possibility that the GL-MV1000 will automatically reconnect at a certain time?
An automated restart once a day would probably fix the problem as well.
But I don’t know how to do it
alzhao
September 9, 2020, 8:35am
13
You need to use cronjob.
Go to advanced settings and find scheduled jobs.
Check this guide [OpenWrt Wiki] Scheduling tasks with cron
reboot the router at 0:00
0 0 * * * reboot
restart wireguard at 0:00
0 0 * * * /etc/init.d/wireguard restart
I try the cronjob to restart wireguard and check it tomorrow.
Thank you
It looks like it works. Wireguard has successfully reconnected.
Many thanks
XXXLA
May 16, 2021, 3:23pm
16
Hello Unfortunately, I don’t speak english well, so I have to have a translator
do this
I have the same problem with the “spitz” I entered the text in the schedule…, but I get errors in the system log
I want every day at 5AM that restart the wireguard
Sun May 16 17:11:14 2021 cron.info crond[15152]: crond (busybox 1.30.1) started, log level 5
Sun May 16 17:11:14 2021 cron.err crond[15152]: user root: parse error at 5*
Sun May 16 17:11:14 2021 cron.err crond[15152]: user root: parse error at /etc/init.d/wireguard
alzhao
May 17, 2021, 4:37am
17
This shows that the format is wrong. Can you pls check carefully if the format is correct.
XXXLA
May 17, 2021, 5:47am
18
How should i check? I have copy and paste from this site
0 5 * * * /etc/init.d/wireguard restart