Thanks for the detailed instruction. I've applied it (as I also updated to newest openwrt).
I will be able to do some more debugging in the evening, but first tries shows as follows.
There's 'exit 0' at my user script so no additional magic ![]()
- dns issues - nextdns uses kind-of round robin but always connects to dns.nextdns.io (and all of those are public ips).
Sat May 9 10:02:37 2026 daemon.notice nextdns[5425]: Connected 38.175.123.217:443 (con=2ms tls=11ms, TCP, TLS13)
but I think that it's behavior might be connected to the way I'm testing 'wan fail':
# wan fail
iptables -I FORWARD -o eth1 -j DROP; iptables -I OUTPUT -o eth1 -j DROP
# wan restore
iptables -D FORWARD -o eth1 -j DROP; iptables -D OUTPUT -o eth1 -j DROP
It's not as direct as ifdown wan and maybe it's nextdns issue of handling connection failure. Just an idea.
For now I'm switching tests to pure ifdown.
I've also added CIDR of wg_awh to 'bypass mwan3' subnet.
- After reboot:
[wan working]
Tailscale routes properly but rather due to daemon
mwan3 starts properly
wireguard [wg_awh] connects viavpn_unlinstead of defaultwanconnection
(for unknown reason ip route shows endpoint of 'wg_awh' tunnel routed via 'vpn_unl' interface)
-
ifdown wan
Tailscale routed properly (no change - butnft list setstill empty)
failover happened as expected (as in terms of connectivity)
wg_awh connected to endpoint... (ip route now shows proper gateway for it - backup lte) -
ifup wan
Tailscale routed properly (no change, pings getting lower)nft liststill empty:
nft list set inet mwan3 mwan3_custom_v4
table inet mwan3 {
set mwan3_custom_v4 {
type ipv4_addr
flags interval
auto-merge
}
}
failover happened as expected
wg_awh is connected properly to wan this time and soon after handshake I can see ping went down.
I'm not checking all wg's as limited time in the morning.
What is strange is that there's no place I could define vpn_unl for wg_awh, it seems to be populated automatically.
root@wrt:~# ip rule list
0: from all lookup local
1001: from all iif eth1 lookup 1
1002: from all iif VLANs.1 lookup 2
1003: from all iif vpn_unl lookup 3
1101: from all fwmark 0x100/0x3f00 lookup 1
1102: from all fwmark 0x200/0x3f00 lookup 2
1103: from all fwmark 0x300/0x3f00 lookup 3
1161: from all fwmark 0x3d00/0x3f00 blackhole
1162: from all fwmark 0x3e00/0x3f00 unreachable
1201: from all fwmark 0x100/0x3f00 unreachable
1202: from all fwmark 0x200/0x3f00 unreachable
1203: from all fwmark 0x300/0x3f00 unreachable
5210: from all fwmark 0x80000/0xff0000 lookup main
5230: from all fwmark 0x80000/0xff0000 lookup default
5250: from all fwmark 0x80000/0xff0000 unreachable
5270: from all lookup 52
32766: from all lookup main
32767: from all lookup default
90029: from all iif lo lookup tailscale
nft list chain inet mwan3 mwan3_rules
table inet mwan3 {
chain mwan3_rules {
meta mark & 0x00ff0000 == 0x00080000 meta mark & 0x00003f00 == 0x00000000 jump mwan3_policy_failover
ip saddr 192.168.40.0/24 ip daddr 0.0.0.0/0 meta mark & 0x00003f00 == 0x00000000 jump mwan3_policy_wan_only
ip daddr 0.0.0.0/0 meta mark & 0x00003f00 == 0x00000000 jump mwan3_policy_failover
}
}
# nft list set inet mwan3 mwan3_custom_v4
table inet mwan3 {
set mwan3_custom_v4 {
type ipv4_addr
flags interval
auto-merge
}
}
I've seen nft list set populated between some of the reboots, but can't see it populated i.e. on tailscale restart.
(Why reboot? just to make sure it will work after powerfail just the same ;-))
# ps w |grep mwan3
2205 root 1724 S {mwan3track} /bin/sh /usr/sbin/mwan3track wan
2206 root 1724 S {mwan3track} /bin/sh /usr/sbin/mwan3track wan_lte
2207 root 1720 S {mwan3track} /bin/sh /usr/sbin/mwan3track vpn_unl
22358 root 1724 S {mwan3track} /bin/sh /usr/sbin/mwan3track wan
Also what I've noticed nextdns sometimes tend to 'catch' endpoint via old gateway and sticks to it. So might add restarting anyway to prevent slow dns ![]()
Sat May 9 10:08:44 2026 daemon.info dnsmasq[1]: using 15 more local addresses
Sat May 9 10:08:44 2026 daemon.notice nextdns[5425]: Received signal: broken pipe (ignored)
Sat May 9 10:08:44 2026 daemon.notice nextdns[5425]: Connected 217.146.13.3:443 (con=46ms tls=145ms, TCP, TLS13)
Sat May 9 10:08:45 2026 user.notice firewall: Reloading firewall due to ifup of wan (eth1)
Will try to take a deeper look in the evening.
Main concern is vpn_unl - do I need to add 'default gateway' to that interface if I want to route only specific traffic via it?
It seems removing that resolves a lot of issues.
Also I've noticed there's some error in rtmon (this is after reboot, but I've also noticed it before deleting one of the intarfaces from mwan3).
Sat May 9 10:00:12 2026 user.notice SQM: Stopping SQM on eth1
Sat May 9 10:00:13 2026 user.notice SQM: Starting SQM script: piece_of_cake.qos on eth1, in: 303000 Kbps, out: 30000 Kbps
Sat May 9 10:00:13 2026 user.notice SQM: piece_of_cake.qos was started on eth1 successfully
Sat May 9 10:00:13 2026 user.notice firewall: Reloading firewall due to ifup of wan (eth1)
Sat May 9 10:00:14 2026 daemon.info procd: Instance mwan3::rtmon_ipv4 s in a crash loop 6 crashes, 0 seconds since last crash
Sat May 9 10:00:14 2026 daemon.info procd: Instance mwan3::rtmon_ipv6 s in a crash loop 6 crashes, 0 seconds since last crash
Sat May 9 10:00:15 2026 daemon.notice nextdns[5425]: Network change detected: ifb4eth1 fe80::2050:99ff:fe8d:9eb9/64 added
Sat May 9 10:00:15 2026 user.notice mwan3-hotplug[9436]: Execute ifup event on interface wan (eth1)
Sat May 9 10:00:16 2026 daemon.notice procd: /etc/rc.d/S96led: setting up led WAN
Sat May 9 10:00:16 2026 daemon.notice procd: /etc/rc.d/S96led: setting up led LAN
Sat May 9 10:00:16 2026 daemon.notice procd: /etc/rc.d/S96led: setting up led WLAN
Sat May 9 10:00:17 2026 daemon.notice procd: /etc/rc.d/S96led: setting up led SYS
