I have to OpenVPN Interfaces, tun0 and tun1 which I try to fail over with mwan3 on OpenWRT 22.03. The interfaces have an error in mwan status
Interface status:
interface wan is online 00h:01m:02s, uptime 121h:39m:20s and tracking is active
interface wan2 is online 00h:01m:02s, uptime 154h:42m:27s and tracking is active
interface tun0 is error (16) and tracking is active
interface tun1 is error (16) and tracking is active
interface wireguard is online 00h:01m:02s, uptime 121h:36m:42s and tracking is active
This is the troubleshooting output:
Software-Version
-------------------------------------------------
OpenWrt - 22.03.0
Output of "ip -4 a show"
-------------------------------------------------
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
6: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
inet 192.168.1.20/24 brd 192.168.1.255 scope global lan1
valid_lft forever preferred_lft forever
7: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
inet 213.47.14.55/24 brd 213.47.14.255 scope global wan
valid_lft forever preferred_lft forever
10: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
inet 192.168.123.1/24 brd 192.168.123.255 scope global br-lan
valid_lft forever preferred_lft forever
14: tun1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 500
inet 10.22.0.8/16 scope global tun1
valid_lft forever preferred_lft forever
19: wireguard: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
inet 10.2.0.2/32 brd 255.255.255.255 scope global wireguard
valid_lft forever preferred_lft forever
22: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 500
inet 10.38.0.2/16 scope global tun0
valid_lft forever preferred_lft forever
Output of "ip -4 route show"
-------------------------------------------------
default via 213.47.14.1 dev wan proto static src 213.47.14.55 metric 10
default via 192.168.1.1 dev lan1 proto static metric 20
default dev wireguard proto static scope link metric 25
default via 10.38.0.1 dev tun0 metric 55
default via 10.22.0.1 dev tun1 metric 65
10.2.0.2 dev wireguard proto static scope link metric 25
10.22.0.0/16 dev tun1 proto kernel scope link src 10.22.0.8
10.38.0.0/16 dev tun0 proto kernel scope link src 10.38.0.2
89.36.76.130 via 213.47.14.1 dev wan proto static metric 10
89.36.76.130 via 192.168.1.1 dev lan1 proto static metric 20
185.159.158.56 via 192.168.1.1 dev lan1 proto static metric 16
185.159.158.106 via 192.168.1.1 dev lan1 proto static metric 15
185.159.158.139 via 192.168.1.1 dev lan1 proto static metric 17
192.168.1.0/24 dev lan1 proto static scope link metric 20
192.168.123.0/24 dev br-lan proto kernel scope link src 192.168.123.1
213.47.14.0/24 dev wan proto static scope link metric 10
Output of "ip -4 rule show"
-------------------------------------------------
0: from all lookup local
1001: from all iif wan lookup 1
1002: from all iif lan1 lookup 2
1003: from all iif wan lookup 3
1004: from all iif lan1 lookup 4
1005: from all iif wireguard lookup 5
2001: from all fwmark 0x100/0x3f00 lookup 1
2002: from all fwmark 0x200/0x3f00 lookup 2
2003: from all fwmark 0x300/0x3f00 lookup 3
2004: from all fwmark 0x400/0x3f00 lookup 4
2005: from all fwmark 0x500/0x3f00 lookup 5
2061: from all fwmark 0x3d00/0x3f00 blackhole
2062: from all fwmark 0x3e00/0x3f00 unreachable
3001: from all fwmark 0x100/0x3f00 unreachable
3002: from all fwmark 0x200/0x3f00 unreachable
3003: from all fwmark 0x300/0x3f00 unreachable
3004: from all fwmark 0x400/0x3f00 unreachable
3005: from all fwmark 0x500/0x3f00 unreachable
32766: from all lookup main
32767: from all lookup default
Output of "ip -4 route list table 1-250"
-------------------------------------------------
Routing table 1:
default via 213.47.14.1 dev wan proto static src 213.47.14.55 metric 10
10.22.0.0/16 dev tun1 proto kernel scope link src 10.22.0.8
10.38.0.0/16 dev tun0 proto kernel scope link src 10.38.0.2
89.36.76.130 via 213.47.14.1 dev wan proto static metric 10
192.168.123.0/24 dev br-lan proto kernel scope link src 192.168.123.1
213.47.14.0/24 dev wan proto static scope link metric 10
Routing table 2:
default via 192.168.1.1 dev lan1 proto static metric 20
10.22.0.0/16 dev tun1 proto kernel scope link src 10.22.0.8
10.38.0.0/16 dev tun0 proto kernel scope link src 10.38.0.2
89.36.76.130 via 192.168.1.1 dev lan1 proto static metric 20
185.159.158.56 via 192.168.1.1 dev lan1 proto static metric 16
185.159.158.106 via 192.168.1.1 dev lan1 proto static metric 15
185.159.158.139 via 192.168.1.1 dev lan1 proto static metric 17
192.168.1.0/24 dev lan1 proto static scope link metric 20
192.168.123.0/24 dev br-lan proto kernel scope link src 192.168.123.1
Routing table 3:
10.22.0.0/16 dev tun1 proto kernel scope link src 10.22.0.8
10.38.0.0/16 dev tun0 proto kernel scope link src 10.38.0.2
192.168.123.0/24 dev br-lan proto kernel scope link src 192.168.123.1
Routing table 4:
10.22.0.0/16 dev tun1 proto kernel scope link src 10.22.0.8
10.38.0.0/16 dev tun0 proto kernel scope link src 10.38.0.2
192.168.123.0/24 dev br-lan proto kernel scope link src 192.168.123.1
Routing table 5:
default dev wireguard proto static scope link metric 25
10.2.0.2 dev wireguard proto static scope link metric 25
10.22.0.0/16 dev tun1 proto kernel scope link src 10.22.0.8
10.38.0.0/16 dev tun0 proto kernel scope link src 10.38.0.2
192.168.123.0/24 dev br-lan proto kernel scope link src 192.168.123.1
Output of "iptables -t mangle -w -L -v -n"
-------------------------------------------------
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
57213 50M mwan3_hook all -- * * 0.0.0.0/0 0.0.0.0/0
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
13589 3491K mwan3_hook all -- * * 0.0.0.0/0 0.0.0.0/0
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain mwan3_connected_ipv4 (2 references)
pkts bytes target prot opt in out source destination
23272 24M MARK all -- * * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_connected_ipv4 dst MARK or 0x3f00
Chain mwan3_custom_ipv4 (2 references)
pkts bytes target prot opt in out source destination
0 0 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_custom_ipv4 dst MARK or 0x3f00
Chain mwan3_dynamic_ipv4 (2 references)
pkts bytes target prot opt in out source destination
0 0 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_dynamic_ipv4 dst MARK or 0x3f00
Chain mwan3_hook (2 references)
pkts bytes target prot opt in out source destination
67296 54M CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00 CONNMARK restore mask 0x3f00
1199 138K mwan3_ifaces_in all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
1100 133K mwan3_custom_ipv4 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
1100 133K mwan3_connected_ipv4 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
486 96178 mwan3_dynamic_ipv4 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
486 96178 mwan3_rules all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
70803 54M CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 CONNMARK save mask 0x3f00
30523 25M mwan3_custom_ipv4 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0x3f00/0x3f00
30523 25M mwan3_connected_ipv4 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0x3f00/0x3f00
7865 1547K mwan3_dynamic_ipv4 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0x3f00/0x3f00
Chain mwan3_iface_in_tun0 (1 references)
pkts bytes target prot opt in out source destination
0 0 MARK all -- wan * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_custom_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- wan * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_connected_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- wan * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_dynamic_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- wan * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00 /* tun0 */ MARK xset 0x300/0x3f00
Chain mwan3_iface_in_tun1 (1 references)
pkts bytes target prot opt in out source destination
0 0 MARK all -- lan1 * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_custom_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
1 69 MARK all -- lan1 * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_connected_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- lan1 * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_dynamic_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
1 69 MARK all -- lan1 * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00 /* tun1 */ MARK xset 0x400/0x3f00
Chain mwan3_iface_in_wan (1 references)
pkts bytes target prot opt in out source destination
0 0 MARK all -- wan * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_custom_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- wan * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_connected_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- wan * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_dynamic_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
86 4538 MARK all -- wan * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00 /* wan */ MARK xset 0x100/0x3f00
Chain mwan3_iface_in_wan2 (1 references)
pkts bytes target prot opt in out source destination
0 0 MARK all -- lan1 * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_custom_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- lan1 * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_connected_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- lan1 * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_dynamic_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- lan1 * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00 /* wan2 */ MARK xset 0x200/0x3f00
Chain mwan3_iface_in_wireguard (1 references)
pkts bytes target prot opt in out source destination
0 0 MARK all -- wireguard * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_custom_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- wireguard * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_connected_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
0 0 MARK all -- wireguard * 0.0.0.0/0 0.0.0.0/0 match-set mwan3_dynamic_ipv4 src mark match 0x0/0x3f00 /* default */ MARK or 0x3f00
11 790 MARK all -- wireguard * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00 /* wireguard */ MARK xset 0x500/0x3f00
Chain mwan3_ifaces_in (1 references)
pkts bytes target prot opt in out source destination
1199 138K mwan3_iface_in_wan all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
1113 133K mwan3_iface_in_tun0 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
1113 133K mwan3_iface_in_tun1 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
1111 133K mwan3_iface_in_wan2 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
1109 133K mwan3_iface_in_wireguard all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
Chain mwan3_policy_vpn_fo (1 references)
pkts bytes target prot opt in out source destination
287 63705 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00 /* wireguard 3 3 */ MARK xset 0x500/0x3f00
Chain mwan3_policy_wan_fo (5 references)
pkts bytes target prot opt in out source destination
0 0 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00 /* wan 3 3 */ MARK xset 0x100/0x3f00
Chain mwan3_policy_wan_only (1 references)
pkts bytes target prot opt in out source destination
4 128 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00 /* wan 3 3 */ MARK xset 0x100/0x3f00
Chain mwan3_rules (1 references)
pkts bytes target prot opt in out source destination
0 0 mwan3_policy_wan_fo all -- * * 0.0.0.0/0 80.64.136.37 mark match 0x0/0x3f00
0 0 mwan3_policy_wan_fo all -- * * 0.0.0.0/0 185.144.161.170 mark match 0x0/0x3f00
0 0 mwan3_policy_wan_fo all -- * * 0.0.0.0/0 185.242.177.6 mark match 0x0/0x3f00
5 160 mwan3_policy_wan_only all -- * * 0.0.0.0/0 212.117.203.60 mark match 0x0/0x3f00
0 0 mwan3_policy_wan_fo all -- * * 0.0.0.0/0 193.22.104.2 mark match 0x0/0x3f00
0 0 mwan3_policy_wan_fo all -- * * 0.0.0.0/0 193.22.104.29 mark match 0x0/0x3f00
453 92938 mwan3_policy_vpn_fo all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0x3f00
If I try to ping the default gateway in mwan diagnostics it says
No gateway for interface tun0 found.
But apparently there is a default gateway
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.38.0.1 0.0.0.0 UG 55 0 0 tun0
default 10.22.0.1 0.0.0.0 UG 65 0 0 tun1
My OpenVPN config is a follows
client
dev tun0
proto udp
local 213.47.14.150
#route-nopull
#pull-filter ignore redirect-gateway
route-nopull
route 0.0.0.0 0.0.0.0 vpn_gateway 55
It used to work with 19.07.
Any help is appreciated!