Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mwan3track not working properly on wireguard interface #10712

Closed
wackejohn opened this issue Dec 7, 2019 · 71 comments · Fixed by #13169
Closed

Mwan3track not working properly on wireguard interface #10712

wackejohn opened this issue Dec 7, 2019 · 71 comments · Fixed by #13169
Assignees

Comments

@wackejohn
Copy link

Maintainer: @feckert
Environment: OpenWrt SNAPSHOT, r11625-a512123a4b
Mwan3 version: 2.8.2-2
Description:
I'm using mwan3 and wireguard as client with latest openwrt snapshot.
And it seemed that the issue was caused by mwan3 itself, when mwan3 was running ,the ping -I $Device not working, and then mwan3 would always mark the wireguard interface down, but the wireguard interface actually working...
Below is the test resault:

root@HOME-Router:~# /usr/bin/ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.120.2 wana: 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5233ms

root@HOME-Router:~# mwan3 stop
root@HOME-Router:~# mwan3 status
Interface status:
 interface wan1 is offline and tracking is down
 interface wan1_6 is offline and tracking is down
 interface wan2 is offline and tracking is down
 interface wan2_6 is offline and tracking is down
 interface wan3 is offline and tracking is down
 interface wan3_6 is offline and tracking is down
 interface wan4 is offline and tracking is down
 interface wan4_6 is offline and tracking is down
 interface wana is offline and tracking is down
 interface wana_6 is offline and tracking is down
 interface wanb is offline and tracking is down
 interface wanb_6 is offline and tracking is down

Current ipv4 policies:

Current ipv6 policies:

Directly connected ipv4 networks:

Directly connected ipv6 networks:

Active ipv4 user rules:

Active ipv6 user rules:

root@HOME-Router:~# /usr/bin/ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.120.2 wana: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=135 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=58 time=135 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=58 time=135 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=58 time=135 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=58 time=136 ms
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 5 received, 16.6667% packet loss, time 5007ms
rtt min/avg/max/mdev = 134.652/135.242/136.296/0.592 ms
root@HOME-Router:~# mwan3 restart
uci: Entry not found
uci: Entry not found
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
uci: Entry not found
uci: Entry not found
uci: Entry not found
uci: Entry not found
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
uci: Entry not found
uci: Entry not found
uci: Entry not found
uci: Entry not found
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
uci: Entry not found
uci: Entry not found
uci: Entry not found
uci: Entry not found
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
uci: Entry not found
uci: Entry not found
uci: Entry not found
uci: Entry not found
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
uci: Entry not found
uci: Entry not found
uci: Entry not found
uci: Entry not found
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
uci: Entry not found
uci: Entry not found
root@HOME-Router:~# /usr/bin/ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.120.2 wana: 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
8 packets transmitted, 0 received, 100% packet loss, time 7247ms

And there is a discuss on the forum:
https://forum.openwrt.org/t/mwan3track-not-working-properly-on-wireguard/49557

@feckert feckert self-assigned this Dec 7, 2019
@wackejohn
Copy link
Author

@feckert Any update about this issue?

@feckert
Copy link
Member

feckert commented Jan 21, 2020

Sorry I have not further explored the subject.
But the errors

RTNETLINK answers: File exists
uci: Entry not found

are strange. First of all we should investigate why this message are shown during mwan3 restart.

@wackejohn
Copy link
Author

Sorry I have not further explored the subject.
But the errors

RTNETLINK answers: File exists
uci: Entry not found

are strange. First of all we should investigate why this message are shown during mwan3 restart.

These errors are always there, maybe it is caused by my mwan3 and firewall configs. Is there any thing I can do for these errors?

@wackejohn
Copy link
Author

wackejohn commented Mar 14, 2020

@feckert
I'm trying to debug myself, and I've found that the mwan3_set_general_iptables() in lib/mwan3/mwan3.sh caused ping failure.

		if ! $IPT -S OUTPUT | grep mwan3_hook &> /dev/null; then
			$IPT -A OUTPUT -j mwan3_hook
		fi

I'm not goot at iptables, is there any way to get the ping working with wireguard interfaces?

@feckert
Copy link
Member

feckert commented May 29, 2020

I have seen that you do not use the ping from busybox. I think this has everything to do with the interface binding that doesn't work by ip-utils, because the version is over 10 years old. In the pullrequest #12229 from @aaronjg there are some changes that would fix this. Please give them a try. And if it does not work please reopen this Issue.

@feckert feckert closed this as completed May 29, 2020
@wackejohn
Copy link
Author

@feckert
Thanks for your reply.
I've tried pullrequest #12229 , but the ping still not working (both from busybox and new ip-utils).

BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r13398-48e3449945
 -----------------------------------------------------
root@HOME-Router_CZ:~# /bin/ping
BusyBox v1.31.1 () multi-call binary.

Usage: ping [OPTIONS] HOST

Send ICMP ECHO_REQUEST packets to network hosts

        -4,-6           Force IP or IPv6 name resolution
        -c CNT          Send only CNT pings
        -s SIZE         Send SIZE data bytes in packets (default 56)
        -i SECS         Interval
        -A              Ping as soon as reply is recevied
        -t TTL          Set TTL
        -I IFACE/IP     Source interface or IP address
        -W SEC          Seconds to wait for the first response (default 10)
                        (after all -c CNT packets are sent)
        -w SEC          Seconds until ping exits (default:infinite)
                        (can exit earlier with -c CNT)
        -q              Quiet, only display output at start
                        and when finished
        -p HEXBYTE      Pattern to use for payload
root@HOME-Router_CZ:~# /usr/bin/ping -V
ping from iputils reboot-13398-g48e3449945+
root@HOME-Router_CZ:~# /bin/ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
root@HOME-Router_CZ:~# /usr/bin/ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.120.2 wana: 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6166ms

@aaronjg
Copy link
Contributor

aaronjg commented May 29, 2020

Can you confirm that busybox ping works when mwan3 is not running?

If that doesn't work, can you provide some additional diagnostics:

  • Output of ip rule list

  • Then add the following logging rules to you firewall, do a ping -c1 -I wana 1.1.1.1, and post the result from the system log?

iptables --table mangle -I POSTROUTING 1 -d 1.1.1.1 -j LOG --log-prefix "postroute start "
iptables --table mangle -A POSTROUTING  -d 1.1.1.1 -j LOG --log-prefix "postroute end  " 
iptables --table mangle -I OUTPUT 1 -d 1.1.1.1 -j LOG --log-prefix "output start "
iptables --table mangle -A OUTPUT  -d 1.1.1.1 -j LOG --log-prefix "output end "

@wackejohn
Copy link
Author

@aaronjg
The busybox ping works when I stop the mwan3:

root@HOME-Router_CZ:~# mwan3 stop
root@HOME-Router_CZ:~# mwan3 interfaces
Interface status:
 interface wan1 is offline and tracking is down
 interface wan1_6 is offline and tracking is down
 interface wan2 is offline and tracking is down
 interface wan2_6 is offline and tracking is down
 interface wan3 is offline and tracking is down
 interface wan3_6 is offline and tracking is down
 interface wan4 is offline and tracking is down
 interface wan4_6 is offline and tracking is down
 interface wana is offline and tracking is down
 interface wana_6 is offline and tracking is down
 interface wanb is offline and tracking is down
 interface wanb_6 is offline and tracking is down

root@HOME-Router_CZ:~# /bin/ping
BusyBox v1.31.1 () multi-call binary.

Usage: ping [OPTIONS] HOST

Send ICMP ECHO_REQUEST packets to network hosts

        -4,-6           Force IP or IPv6 name resolution
        -c CNT          Send only CNT pings
        -s SIZE         Send SIZE data bytes in packets (default 56)
        -i SECS         Interval
        -A              Ping as soon as reply is recevied
        -t TTL          Set TTL
        -I IFACE/IP     Source interface or IP address
        -W SEC          Seconds to wait for the first response (default 10)
                        (after all -c CNT packets are sent)
        -w SEC          Seconds until ping exits (default:infinite)
                        (can exit earlier with -c CNT)
        -q              Quiet, only display output at start
                        and when finished
        -p HEXBYTE      Pattern to use for payload
root@HOME-Router_CZ:~# /bin/ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=58 time=136.848 ms
64 bytes from 8.8.8.8: seq=1 ttl=58 time=136.043 ms
64 bytes from 8.8.8.8: seq=2 ttl=58 time=136.566 ms
64 bytes from 8.8.8.8: seq=3 ttl=58 time=137.378 ms
64 bytes from 8.8.8.8: seq=4 ttl=58 time=136.683 ms
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 136.043/136.703/137.378 ms
root@HOME-Router_CZ:~# /bin/ping -I wanb 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=55 time=141.829 ms
64 bytes from 8.8.8.8: seq=1 ttl=55 time=142.050 ms
64 bytes from 8.8.8.8: seq=2 ttl=55 time=141.761 ms
64 bytes from 8.8.8.8: seq=3 ttl=55 time=141.551 ms
64 bytes from 8.8.8.8: seq=4 ttl=55 time=141.491 ms
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 141.491/141.736/142.050 ms

And the output when mwan3 was running:

root@HOME-Router_CZ:~# ip rule list
0:      from all lookup local
1001:   from all iif pppoe-wan1 lookup 1
1003:   from all iif pppoe-wan2 lookup 3
1005:   from all iif pppoe-wan3 lookup 5
1007:   from all iif pppoe-wan4 lookup 7
1009:   from all iif wana lookup 9
1011:   from all iif wanb lookup 11
2001:   from all fwmark 0x100/0x3f00 lookup 1
2003:   from all fwmark 0x300/0x3f00 lookup 3
2005:   from all fwmark 0x500/0x3f00 lookup 5
2007:   from all fwmark 0x700/0x3f00 lookup 7
2009:   from all fwmark 0x900/0x3f00 lookup 9
2011:   from all fwmark 0xb00/0x3f00 lookup 11
2061:   from all fwmark 0x3d00/0x3f00 blackhole
2062:   from all fwmark 0x3e00/0x3f00 unreachable
32766:  from all lookup main
32767:  from all lookup default
root@HOME-Router_CZ:~# iptables --table mangle -I POSTROUTING 1 -d 8.8.8.8 -j LOG --log-prefix "postroute start "
root@HOME-Router_CZ:~# iptables --table mangle -A POSTROUTING  -d 8.8.8.8 -j LOG --log-prefix "postroute end  " 
root@HOME-Router_CZ:~# iptables --table mangle -I OUTPUT 1 -d 8.8.8.8 -j LOG --log-prefix "output start "
root@HOME-Router_CZ:~# iptables --table mangle -A OUTPUT  -d 8.8.8.8 -j LOG --log-prefix "output end "
root@HOME-Router_CZ:~# /bin/ping -c1 -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
root@HOME-Router_CZ:~# logread |grep "postroute start"
Sat May 30 08:40:14 2020 kern.warn kernel: [34815.895080] postroute start IN= OUT=wana SRC=192.168.120.2 DST=8.8.8.8 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=49580 DF PROTO=ICMP TYPE=8 CODE=0 ID=37655 SEQ=0 MARK=0x900
root@HOME-Router_CZ:~# logread |grep "postroute end"
Sat May 30 08:40:14 2020 kern.warn kernel: [34815.910087] postroute end  IN= OUT=wana SRC=192.168.120.2 DST=8.8.8.8 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=49580 DF PROTO=ICMP TYPE=8 CODE=0 ID=37655 SEQ=0 MARK=0x900
root@HOME-Router_CZ:~# logread |grep "output start"
Sat May 30 08:40:14 2020 kern.warn kernel: [34815.866656] output start IN= OUT=wana SRC=192.168.120.2 DST=8.8.8.8 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=49580 DF PROTO=ICMP TYPE=8 CODE=0 ID=37655 SEQ=0
root@HOME-Router_CZ:~# logread |grep "output end"
Sat May 30 08:40:14 2020 kern.warn kernel: [34815.880484] output end IN= OUT=wana SRC=192.168.120.2 DST=8.8.8.8 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=49580 DF PROTO=ICMP TYPE=8 CODE=0 ID=37655 SEQ=0 MARK=0x900

@aaronjg
Copy link
Contributor

aaronjg commented May 30, 2020

Is that the correct src ip? It looks like it is a wan, but has a private IP address.

Can you share the output of
ip route list
and
ip route list table 9

I am wondering if your VPN set up two half internet routes rather than one default route. Those would then be copied over to the other routing tables and could cause issues.

@wackejohn
Copy link
Author

@aaronjg
wana and wanb were the wireguard vpn and worked as internet connections, so the src ip was correct.
The output:

root@HOME-Router_CZ:~# ip route list
default via 180.116.118.1 dev pppoe-wan1 proto static metric 10 
default via 114.228.153.1 dev pppoe-wan2 proto static metric 15 
default via 223.66.36.1 dev pppoe-wan3 proto static metric 20 
default via 183.213.154.1 dev pppoe-wan4 proto static metric 25 
114.228.153.1 dev pppoe-wan2 proto kernel scope link src 114.228.153.21 
180.116.118.1 dev pppoe-wan1 proto kernel scope link src 180.116.118.230 
183.213.154.1 dev pppoe-wan4 proto kernel scope link src 183.213.155.69 
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1 
192.168.2.0/24 dev vpn1 proto static scope link metric 110 
192.168.3.0/24 dev vpn1 proto static scope link metric 110 
192.168.120.0/24 dev wana proto static scope link metric 30 
192.168.150.0/24 dev wanb proto static scope link metric 40 
192.168.195.0/24 dev vpn0 proto static scope link metric 100 
192.168.195.2 dev vpn0 proto static scope link metric 100 
192.168.195.3 dev vpn0 proto static scope link metric 100 
192.168.195.4 dev vpn0 proto static scope link metric 100 
192.168.195.5 dev vpn0 proto static scope link metric 100 
192.168.195.6 dev vpn0 proto static scope link metric 100 
192.168.196.0/24 dev vpn1 proto static scope link metric 110 
192.168.196.2 dev vpn1 proto static scope link metric 110 
192.168.196.3 dev vpn1 proto static scope link metric 110 
223.66.36.1 dev pppoe-wan3 proto kernel scope link src 223.66.36.129 
root@HOME-Router_CZ:~# ip route list table 9
default dev wana scope link metric 30 
114.228.153.1 dev pppoe-wan2 proto kernel scope link src 114.228.153.21 
180.116.118.1 dev pppoe-wan1 proto kernel scope link src 180.116.118.230 
183.213.154.1 dev pppoe-wan4 proto kernel scope link src 183.213.155.69 
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1 
192.168.2.0/24 dev vpn1 proto static scope link metric 110 
192.168.3.0/24 dev vpn1 proto static scope link metric 110 
192.168.120.0/24 dev wana proto static scope link metric 30 
192.168.150.0/24 dev wanb proto static scope link metric 40 
192.168.195.0/24 dev vpn0 proto static scope link metric 100 
192.168.195.2 dev vpn0 proto static scope link metric 100 
192.168.195.3 dev vpn0 proto static scope link metric 100 
192.168.195.4 dev vpn0 proto static scope link metric 100 
192.168.195.5 dev vpn0 proto static scope link metric 100 
192.168.195.6 dev vpn0 proto static scope link metric 100 
192.168.196.0/24 dev vpn1 proto static scope link metric 110 
192.168.196.2 dev vpn1 proto static scope link metric 110 
192.168.196.3 dev vpn1 proto static scope link metric 110 
223.66.36.1 dev pppoe-wan3 proto kernel scope link src 223.66.36.129 

@aaronjg
Copy link
Contributor

aaronjg commented May 30, 2020

It looks like you have no routes beyond the subnet for the wireguard interface. If you don't have a default route, then mwan3 isn't going to be able to copy anything over into the relevant table.

I think you need to configure your wireguard to add the default routes, or do it manually after the link comes up.

I'm curious how it is working without mwan3 enabled. Can you turn mwan3 off and post the same results from the iptables logs?

@wackejohn
Copy link
Author

The log when mwan3 stoped:

root@HOME-Router_CZ:~# /bin/ping -c1 -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=58 time=193.008 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 193.008/193.008/193.008 ms
root@HOME-Router_CZ:~# logread |grep "postroute start"
Sat May 30 10:14:51 2020 kern.warn kernel: [40492.986831] postroute start IN= OUT=wana SRC=192.168.120.2 DST=8.8.8.8 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=5275 DF PROTO=ICMP TYPE=8 CODE=0 ID=18496 SEQ=0
root@HOME-Router_CZ:~# logread |grep "postroute end"
Sat May 30 10:14:51 2020 kern.warn kernel: [40493.000785] postroute end  IN= OUT=wana SRC=192.168.120.2 DST=8.8.8.8 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=5275 DF PROTO=ICMP TYPE=8 CODE=0 ID=18496 SEQ=0
root@HOME-Router_CZ:~# logread |grep "output start"
Sat May 30 10:14:51 2020 kern.warn kernel: [40492.959591] output start IN= OUT=wana SRC=192.168.120.2 DST=8.8.8.8 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=5275 DF PROTO=ICMP TYPE=8 CODE=0 ID=18496 SEQ=0
root@HOME-Router_CZ:~# logread |grep "output end"
Sat May 30 10:14:51 2020 kern.warn kernel: [40492.973292] output end IN= OUT=wana SRC=192.168.120.2 DST=8.8.8.8 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=5275 DF PROTO=ICMP TYPE=8 CODE=0 ID=18496 SEQ=0

And how to add the default route for wireguard interface?

@aaronjg
Copy link
Contributor

aaronjg commented May 30, 2020

Sorry, I don't use wireguard so I can't help you there. With OtherVPNs, the routes are often pushed to you and the VPN client then sets them up. You could do it manually with
ip route add ...

@wackejohn
Copy link
Author

wackejohn commented May 30, 2020

I think it's not about the default route thing, I've add the defalut route for wireguard interface, and restarted the mwan3, but the ping still not working.

BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r13398-48e3449945
 -----------------------------------------------------
root@HOME-Router_CZ:~# ip route list
default via 180.116.118.1 dev pppoe-wan1 proto static metric 10 
default via 114.228.153.1 dev pppoe-wan2 proto static metric 15 
default via 223.66.36.1 dev pppoe-wan3 proto static metric 20 
default via 183.213.154.1 dev pppoe-wan4 proto static metric 25 
default via 192.168.120.1 dev wana metric 30 
default via 192.168.150.1 dev wanb metric 40 
114.228.153.1 dev pppoe-wan2 proto kernel scope link src 114.228.153.21 
180.116.118.1 dev pppoe-wan1 proto kernel scope link src 180.116.118.230 
183.213.154.1 dev pppoe-wan4 proto kernel scope link src 183.213.155.69 
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1 
192.168.2.0/24 dev vpn1 proto static scope link metric 110 
192.168.3.0/24 dev vpn1 proto static scope link metric 110 
192.168.120.0/24 dev wana proto static scope link metric 30 
192.168.150.0/24 dev wanb proto static scope link metric 40 
192.168.195.0/24 dev vpn0 proto static scope link metric 100 
192.168.195.2 dev vpn0 proto static scope link metric 100 
192.168.195.3 dev vpn0 proto static scope link metric 100 
192.168.195.4 dev vpn0 proto static scope link metric 100 
192.168.195.5 dev vpn0 proto static scope link metric 100 
192.168.195.6 dev vpn0 proto static scope link metric 100 
192.168.196.0/24 dev vpn1 proto static scope link metric 110 
192.168.196.2 dev vpn1 proto static scope link metric 110 
192.168.196.3 dev vpn1 proto static scope link metric 110 
223.66.36.1 dev pppoe-wan3 proto kernel scope link src 223.66.36.129 
root@HOME-Router_CZ:~# /bin/ping -c1 -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss

@wackejohn
Copy link
Author

@feckert
Can you reopen this issue for me please? thanks.

@aaronjg
Copy link
Contributor

aaronjg commented May 30, 2020

You may also need a static route to the wireguard endpoint in your table. It does not look like the wireguard routes were set up correctly.

Also, it looks like you are running a development build. Can you try it with the latest stable release?

@wackejohn
Copy link
Author

@aaronjg
The wireguard endpoint route was deleted and it's working well without the static out, but the mwan3track not working with or without the static route.
My device running the development build for years, so it's inconvenient to switch to stable release, but i think it will be the same situation.

@feckert feckert reopened this Jun 3, 2020
@aaronjg
Copy link
Contributor

aaronjg commented Jun 15, 2020

@wackejohn I just ran into this issue myself. It appears that something is handled differently when the outgoing interface is 192.168.X.X.

Can you try applying this commit, and see if it fixes things for you?

aaronjg@3f1152b

@wackejohn
Copy link
Author

@aaronjg
I've tried the commit, but still no lucky...

root@HOME-Router_HB:~# /bin/ping
BusyBox v1.31.1 () multi-call binary.

Usage: ping [OPTIONS] HOST

Send ICMP ECHO_REQUEST packets to network hosts

        -4,-6           Force IP or IPv6 name resolution
        -c CNT          Send only CNT pings
        -s SIZE         Send SIZE data bytes in packets (default 56)
        -i SECS         Interval
        -A              Ping as soon as reply is recevied
        -t TTL          Set TTL
        -I IFACE/IP     Source interface or IP address
        -W SEC          Seconds to wait for the first response (default 10)
                        (after all -c CNT packets are sent)
        -w SEC          Seconds until ping exits (default:infinite)
                        (can exit earlier with -c CNT)
        -q              Quiet, only display output at start
                        and when finished
        -p HEXBYTE      Pattern to use for payload
root@HOME-Router_HB:~# /bin/ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
root@HOME-Router_HB:~# /bin/ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=1 ttl=116 time=37.902 ms
64 bytes from 8.8.8.8: seq=2 ttl=116 time=37.761 ms
64 bytes from 8.8.8.8: seq=4 ttl=116 time=37.525 ms
64 bytes from 8.8.8.8: seq=5 ttl=116 time=37.710 ms
64 bytes from 8.8.8.8: seq=7 ttl=116 time=38.157 ms
^C
--- 8.8.8.8 ping statistics ---
9 packets transmitted, 5 packets received, 44% packet loss
root@HOME-Router_HB:~# traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 38 byte packets
 1  192.168.120.1 (192.168.120.1)  135.816 ms  138.259 ms  138.762 ms
 2  172.22.61.200 (172.22.61.200)  154.769 ms  152.138 ms  154.381 ms
 3  72.14.222.37 (72.14.222.37)  146.069 ms  139.710 ms  146.242 ms
 4  108.170.247.225 (108.170.247.225)  138.113 ms  108.170.247.129 (108.170.247.129)  143.132 ms  108.170.247.225 (108.170.247.225)  182.618 ms
 5  209.85.143.255 (209.85.143.255)  198.962 ms  66.249.94.217 (66.249.94.217)  254.052 ms  142.250.226.109 (142.250.226.109)  224.975 ms
 6  dns.google (8.8.8.8)  141.630 ms  141.739 ms  146.930 ms

And it seemed that the icmp packages didn't pass through the vpn.

@aaronjg
Copy link
Contributor

aaronjg commented Jun 16, 2020

So, with the trace route it looks like the packets are going through your vpn (192.168.120.1) when you don’t specify the interface, but not when you do? Looks like the issue I ran into is different from the issue I had.

@wackejohn
Copy link
Author

@aaronjg
As my mwan3 config:

config rule 'AntiGFW_DNS'
        option proto 'all'
        option dest_ip '8.8.8.8,8.8.4.4,208.67.222.222,208.67.220.220,199.91.73.222,178.79.131.110'
        option sticky '0'
        option family 'ipv4'
        option use_policy 'wana_wanb'

the icmp packets should pass through the vpn (wana or wanb) wether specify the interface or not.

@aaronjg
Copy link
Contributor

aaronjg commented Jun 16, 2020

yes, but there are different rules that are applied to route them out of the interface when you specify the interface vs when you don't.

I am surprised that they are being blocked with the new patch. That should make the ICMP echo packets skip the mwan3 rules entirely when you are specifying the bound interface.

What kernel version are you using? I'll do the best I can to help, but I may not be able to reproduce since you are on the snapshot...

A few more diagnostics - can you repeat the firewall logging with the new patch? I want to see if these packets are somehow still getting marked.

Can you try pinging an IP , eg 1.1.1.1, not covered by your mwan3 rule?

What is the output of:
ip -4 addr ls wana
ipset list mwan3_source_v4
iptables --table mangle -S mwan3_hook

@jamesmacwhite
Copy link
Contributor

jamesmacwhite commented Jun 16, 2020

So, not to try and create noise here, but I recently switched from OpenVPN to Wireguard with mwan3, evaluating Wireguard vs OpenVPN, I found the IPv6 side was a bit off, but the latest changes from @aaronjg, fixes those.

I have two Wireguard VPN interfaces as clients load balanced with Mullvad and it works OK. I'm on 19.07.3 kernel 4.14.180 on a Linksys WRT3200ACM. Currently running mwan3 2.8.6, but I'm aware you've tried the changes and it hasn't worked.

Have you tried stripping back the mwan3 config to a very minimal setup?

@aaronjg
Copy link
Contributor

aaronjg commented Jun 17, 2020 via email

@jamesmacwhite
Copy link
Contributor

@aaronjg Mullvad provides an IPv4 in the 10.0.0.0/8 range and a single /128 fc00::/7 ULA as they use NAT66.

In order to have IPv4 and IPv6 working with mwan3, I have a wg6 and wgb6 as an alias to the main wg and wgb interfaces with the /128 ULA configured as a static, so I can have both IPv4 and IPv6 control. As with anything Wireguard currently, you always get a static IPv4 and IPv6 based on your private/public key.

The IPv6 side seems unrelated in this case, because it looks like @wackejohn can't even use the Wireguard inferface once mwan3 is enabled, but in my case:

root@linksys-wrt3200acm:~# traceroute -i wg openwrt.org
traceroute to openwrt.org (139.59.209.225), 30 hops max, 38 byte packets
 1  10.64.0.1 (10.64.0.1)  20.292 ms  25.235 ms  15.759 ms
 2  vlan817.bb2.lon7.uk.m247.com (185.200.118.99)  17.486 ms  15.898 ms  16.395 ms
 3  37.120.220.58 (37.120.220.58)  18.236 ms  21.289 ms  48.244 ms
 4  xe-2-0-0-0.core1.lon2.uk.m247.com (176.10.82.158)  19.059 ms  xe-2-2-2-0.core1.lon2.uk.m247.com (83.97.21.236)  24.275 ms  xe-2-0-0-0.core1.lon2.uk.m247.com (176.10.82.158)  20.991 ms
 5  89.44.212.108 (89.44.212.108)  38.722 ms  89.44.212.110 (89.44.212.110)  31.225 ms  89.44.212.4 (89.44.212.4)  35.174 ms
 6  37.120.128.253 (37.120.128.253)  29.299 ms  32.342 ms  27.820 ms
 7  fra2-edge1.digitalocean.com (80.81.195.151)  31.283 ms  33.836 ms  35.757 ms
 8  *  *  *
 9  *  *  *
10  wiki-01.infra.openwrt.org (139.59.209.225)  42.591 ms  31.464 ms  32.306 ms
root@linksys-wrt3200acm:~# traceroute -i wgb openwrt.org
traceroute to openwrt.org (139.59.209.225), 30 hops max, 38 byte packets
 1  10.64.0.1 (10.64.0.1)  31.416 ms  22.988 ms  33.543 ms
 2  vlan74.xs1a.man4.uk.m247.com (89.238.183.58)  24.190 ms  23.847 ms  23.517 ms
 3  eth-1-0.core-dc1-agg1.man4.uk.m247.com (77.243.185.82)  23.718 ms  22.940 ms  23.778 ms
 4  xe-1-1-1-0.core1.man4.uk.m247.com (77.243.185.66)  24.027 ms  24.940 ms  22.331 ms
 5  te-12-5-0.core-dc2.man4.uk.m247.com (83.97.21.151)  43.766 ms  te-9-3-0.bb1.lon1.uk.m247.com (212.103.51.17)  45.725 ms  te-13-4-0.core-dc2.man4.uk.m247.com (77.243.176.47)  41.174 ms
 6  xe-3-3-1-0.core1.lon2.uk.m247.com (193.9.115.143)  31.692 ms  xe-3-0-2-0.core1.lon2.uk.m247.com (77.243.185.215)  32.758 ms  xe-5-0-0-0.core1.lon2.uk.m247.com (176.10.82.22)  30.290 ms
 7  89.44.212.110 (89.44.212.110)  38.744 ms  xe-4-0-1-0.core1.fra2.de.m247.com (193.9.115.137)  46.178 ms  46.206 ms
 8  37.120.128.253 (37.120.128.253)  41.575 ms  40.368 ms  41.920 ms
 9  *  *  *
10  *  *  *
11  *  *  *
12  wiki-01.infra.openwrt.org (139.59.209.225)  42.859 ms  41.151 ms  39.960 ms

Perhaps it is related to the 192.168.0.0 range.

@wackejohn
Copy link
Author

wackejohn commented Jun 19, 2020

@aaronjg
So, I've changed the vpn address to 10.10.1.0/24, but it's still not working.

root@HOME-Router_HB:~# ip -4 addr ls wana
27: wana: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1300 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 10.10.1.3/24 brd 10.10.1.255 scope global wana
       valid_lft forever preferred_lft forever
root@HOME-Router_HB:~# ipset list mwan3_source_v4
Name: mwan3_source_v4
Type: hash:net
Revision: 6
Header: family inet hashsize 1024 maxelem 65536
Size in memory: 704
References: 1
Number of entries: 6
Members:
192.168.196.2
10.10.1.3
117.85.168.51
192.168.2.1
58.219.110.163
192.168.150.3
root@HOME-Router_HB:~# iptables --table mangle -S mwan3_hook
-N mwan3_hook
-A mwan3_hook -p icmp -m set --match-set mwan3_source_v4 src -m icmp --icmp-type 8 -j RETURN
-A mwan3_hook -j CONNMARK --restore-mark --nfmask 0xff00 --ctmask 0xff00
-A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_ifaces_in
-A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_connected
-A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_rules
-A mwan3_hook -j CONNMARK --save-mark --nfmask 0xff00 --ctmask 0xff00
-A mwan3_hook -m mark ! --mark 0xff00/0xff00 -j mwan3_connected
root@HOME-Router_HB:~# /bin/ping 199.85.126.10
PING 199.85.126.10 (199.85.126.10): 56 data bytes
64 bytes from 199.85.126.10: seq=0 ttl=57 time=29.872 ms
64 bytes from 199.85.126.10: seq=1 ttl=57 time=29.876 ms
64 bytes from 199.85.126.10: seq=2 ttl=57 time=30.275 ms
64 bytes from 199.85.126.10: seq=3 ttl=57 time=29.513 ms
^C
--- 199.85.126.10 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 29.513/29.884/30.275 ms
root@HOME-Router_HB:~# /bin/ping -i wana 199.85.126.10
ping: invalid number 'wana'
root@HOME-Router_HB:~# /bin/ping -I wana 199.85.126.10
PING 199.85.126.10 (199.85.126.10): 56 data bytes
^C
--- 199.85.126.10 ping statistics ---
7 packets transmitted, 0 packets received, 100% packet loss
root@HOME-Router_HB:~# traceroute -i wana 199.85.126.10
traceroute to 199.85.126.10 (199.85.126.10), 30 hops max, 38 byte packets
 1  *  *  *
 2  *  *  *
 3  *  *  *
 4  *  *  *
 5  *  *  *
 6^C

My openwrt version:


BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r13578-b7a8a54542
 -----------------------------------------------------

Kernel version:

Linux HOME-Router_HB 5.4.45 #0 SMP Mon Jun 15 19:16:18 2020 armv7l GNU/Linux

And the firewall log:

root@HOME-Router_HB:~# iptables --table mangle -I POSTROUTING 1 -d 199.85.126.10 -j LOG --log-prefix "postroute start "
root@HOME-Router_HB:~# iptables --table mangle -A POSTROUTING  -d 199.85.126.10 -j LOG --log-prefix "postroute end  " 
root@HOME-Router_HB:~# iptables --table mangle -I OUTPUT 1 -d 199.85.126.10 -j LOG --log-prefix "output start "
root@HOME-Router_HB:~# iptables --table mangle -A OUTPUT  -d 199.85.126.10 -j LOG --log-prefix "output end "
root@HOME-Router_HB:~# /bin/ping -c1 -I wana 199.85.126.10
PING 199.85.126.10 (199.85.126.10): 56 data bytes
^C
--- 199.85.126.10 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
root@HOME-Router_HB:~# logread |grep "postroute start"
Fri Jun 19 08:30:37 2020 kern.warn kernel: [252543.234957] postroute start IN= OUT=wana SRC=10.10.1.3 DST=199.85.126.10 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=32357 DF PROTO=ICMP TYPE=8 CODE=0 ID=18558 SEQ=0
root@HOME-Router_HB:~# logread |grep "postroute end"
Fri Jun 19 08:30:37 2020 kern.warn kernel: [252543.249298] postroute end  IN= OUT=wana SRC=10.10.1.3 DST=199.85.126.10 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=32357 DF PROTO=ICMP TYPE=8 CODE=0 ID=18558 SEQ=0
root@HOME-Router_HB:~# logread |grep "output start"
Fri Jun 19 08:30:37 2020 kern.warn kernel: [252543.206892] output start IN= OUT=wana SRC=10.10.1.3 DST=199.85.126.10 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=32357 DF PROTO=ICMP TYPE=8 CODE=0 ID=18558 SEQ=0
root@HOME-Router_HB:~# logread |grep "output end"
Fri Jun 19 08:30:37 2020 kern.warn kernel: [252543.220978] output end IN= OUT=wana SRC=10.10.1.3 DST=199.85.126.10 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=32357 DF PROTO=ICMP TYPE=8 CODE=0 ID=18558 SEQ=0
root@HOME-Router_HB:~# 

@jamesmacwhite
Copy link
Contributor

jamesmacwhite commented Jun 19, 2020

@wackejohn My only thoughts would be the fact you're on the snapshot builds and the kernel branch is different 4.x vs 5.x. I'll happy provide any configuration of the Wireguard clients and network config I have setup to see if you find anything different that jumps out, but that's the only area I can see at that moment that could explain the difference in behaviour.

@wackejohn
Copy link
Author

wackejohn commented Jul 12, 2020

@aaronjg

Okay - very strange that the src ip changed with mwan3 running and not. 180.112.126.158 v 180.112.50.137

My ISP provide the dynamic pppoe connection, the ip addr will change on ervery reconnect. It was my mistake that I copied the previous log.

The right log:

[  249.122255] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=29806 PROTO=UDP SPT=53766 DPT=51888 LEN=156 
[  249.136949] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=29806 PROTO=UDP SPT=53766 DPT=51888 LEN=156 MARK=0x3f00 
[  249.152521] postroute startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=29806 PROTO=UDP SPT=53766 DPT=51888 LEN=156 MARK=0x3f00 
[  249.168472] postroute endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=29806 PROTO=UDP SPT=53766 DPT=51888 LEN=156 MARK=0x3f00 
[  249.333152] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29814 PROTO=UDP SPT=53766 DPT=51888 LEN=136 
[  249.347822] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29814 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  249.363379] postroute startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29814 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  249.379328] postroute endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29814 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  250.186954] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29827 PROTO=UDP SPT=53766 DPT=51888 LEN=136 
[  250.201625] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29827 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  250.217190] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29827 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  250.232704] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29827 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  251.186778] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29829 PROTO=UDP SPT=53766 DPT=51888 LEN=136 
[  251.201465] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29829 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  251.217046] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29829 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  251.232565] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29829 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  251.327170] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29838 PROTO=UDP SPT=53766 DPT=51888 LEN=200 
[  251.341842] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29838 PROTO=UDP SPT=53766 DPT=51888 LEN=200 MARK=0x3f00 
[  251.357411] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29838 PROTO=UDP SPT=53766 DPT=51888 LEN=200 MARK=0x3f00 
[  251.372925] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29838 PROTO=UDP SPT=53766 DPT=51888 LEN=200 MARK=0x3f00 
[  251.475861] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29839 PROTO=UDP SPT=53766 DPT=51888 LEN=264 
[  251.490533] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29839 PROTO=UDP SPT=53766 DPT=51888 LEN=264 MARK=0x3f00 
[  251.506101] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29839 PROTO=UDP SPT=53766 DPT=51888 LEN=264 MARK=0x3f00 
[  251.521614] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29839 PROTO=UDP SPT=53766 DPT=51888 LEN=264 MARK=0x3f00 
[  251.556966] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29841 PROTO=UDP SPT=53766 DPT=51888 LEN=328 
[  251.571631] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29841 PROTO=UDP SPT=53766 DPT=51888 LEN=328 MARK=0x3f00 
[  251.587199] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29841 PROTO=UDP SPT=53766 DPT=51888 LEN=328 MARK=0x3f00 
[  251.602711] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29841 PROTO=UDP SPT=53766 DPT=51888 LEN=328 MARK=0x3f00 
[  251.618711] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29842 PROTO=UDP SPT=53766 DPT=51888 LEN=392 
[  251.633392] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29842 PROTO=UDP SPT=53766 DPT=51888 LEN=392 MARK=0x3f00 
[  251.648941] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29842 PROTO=UDP SPT=53766 DPT=51888 LEN=392 MARK=0x3f00 
[  251.664455] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29842 PROTO=UDP SPT=53766 DPT=51888 LEN=392 MARK=0x3f00 
[  251.680630] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29847 PROTO=UDP SPT=53766 DPT=51888 LEN=456 
[  251.695306] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29847 PROTO=UDP SPT=53766 DPT=51888 LEN=456 MARK=0x3f00 
[  251.710856] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29847 PROTO=UDP SPT=53766 DPT=51888 LEN=456 MARK=0x3f00 
[  251.726370] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29847 PROTO=UDP SPT=53766 DPT=51888 LEN=456 MARK=0x3f00 
[  251.742266] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29852 PROTO=UDP SPT=53766 DPT=51888 LEN=520 
[  251.756962] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29852 PROTO=UDP SPT=53766 DPT=51888 LEN=520 MARK=0x3f00 
[  251.772524] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29852 PROTO=UDP SPT=53766 DPT=51888 LEN=520 MARK=0x3f00 
[  251.788038] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29852 PROTO=UDP SPT=53766 DPT=51888 LEN=520 MARK=0x3f00 
[  251.804120] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29854 PROTO=UDP SPT=53766 DPT=51888 LEN=584 
[  251.818804] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29854 PROTO=UDP SPT=53766 DPT=51888 LEN=584 MARK=0x3f00 
[  251.834357] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29854 PROTO=UDP SPT=53766 DPT=51888 LEN=584 MARK=0x3f00 
[  251.849872] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29854 PROTO=UDP SPT=53766 DPT=51888 LEN=584 MARK=0x3f00 
[  251.866016] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29859 PROTO=UDP SPT=53766 DPT=51888 LEN=648 
[  251.880694] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29859 PROTO=UDP SPT=53766 DPT=51888 LEN=648 MARK=0x3f00 
[  251.896242] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29859 PROTO=UDP SPT=53766 DPT=51888 LEN=648 MARK=0x3f00 
[  251.911751] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29859 PROTO=UDP SPT=53766 DPT=51888 LEN=648 MARK=0x3f00 
[  251.927804] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29863 PROTO=UDP SPT=53766 DPT=51888 LEN=712 
[  251.942477] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29863 PROTO=UDP SPT=53766 DPT=51888 LEN=712 MARK=0x3f00 
[  251.958027] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29863 PROTO=UDP SPT=53766 DPT=51888 LEN=712 MARK=0x3f00 
[  251.973537] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29863 PROTO=UDP SPT=53766 DPT=51888 LEN=712 MARK=0x3f00 
[  251.989584] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29868 PROTO=UDP SPT=53766 DPT=51888 LEN=776 
[  252.004261] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29868 PROTO=UDP SPT=53766 DPT=51888 LEN=776 MARK=0x3f00 
[  252.019812] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29868 PROTO=UDP SPT=53766 DPT=51888 LEN=776 MARK=0x3f00 
[  252.035327] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29868 PROTO=UDP SPT=53766 DPT=51888 LEN=776 MARK=0x3f00 
[  252.051684] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=29872 PROTO=UDP SPT=53766 DPT=51888 LEN=840 
[  252.066361] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=29872 PROTO=UDP SPT=53766 DPT=51888 LEN=840 MARK=0x3f00 
[  252.081930] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=29872 PROTO=UDP SPT=53766 DPT=51888 LEN=840 MARK=0x3f00 
[  252.097446] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=29872 PROTO=UDP SPT=53766 DPT=51888 LEN=840 MARK=0x3f00 
[  252.114117] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=29873 PROTO=UDP SPT=53766 DPT=51888 LEN=904 
[  252.128796] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=29873 PROTO=UDP SPT=53766 DPT=51888 LEN=904 MARK=0x3f00 
[  252.144346] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=29873 PROTO=UDP SPT=53766 DPT=51888 LEN=904 MARK=0x3f00 
[  252.159860] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=29873 PROTO=UDP SPT=53766 DPT=51888 LEN=904 MARK=0x3f00 
[  252.175950] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=29878 PROTO=UDP SPT=53766 DPT=51888 LEN=968 
[  252.190652] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=29878 PROTO=UDP SPT=53766 DPT=51888 LEN=968 MARK=0x3f00 
[  252.206209] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=29878 PROTO=UDP SPT=53766 DPT=51888 LEN=968 MARK=0x3f00 
[  252.221724] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=29878 PROTO=UDP SPT=53766 DPT=51888 LEN=968 MARK=0x3f00 
[  252.239147] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=29882 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 
[  252.253998] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=29882 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 MARK=0x3f00 
[  252.269732] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=29882 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 MARK=0x3f00 
[  252.285423] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=29882 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 MARK=0x3f00 
[  252.301758] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29886 PROTO=UDP SPT=53766 DPT=51888 LEN=136 
[  252.316440] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29886 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  252.331993] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29886 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  252.347514] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29886 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  252.363793] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=29889 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 
[  252.378646] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=29889 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 MARK=0x3f00 
[  252.394367] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=29889 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 MARK=0x3f00 
[  252.410052] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=29889 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 MARK=0x3f00 
[  252.426284] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29896 PROTO=UDP SPT=53766 DPT=51888 LEN=200 
[  252.440958] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29896 PROTO=UDP SPT=53766 DPT=51888 LEN=200 MARK=0x3f00 
[  252.456506] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29896 PROTO=UDP SPT=53766 DPT=51888 LEN=200 MARK=0x3f00 
[  252.472030] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29896 PROTO=UDP SPT=53766 DPT=51888 LEN=200 MARK=0x3f00 
[  252.488500] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=29900 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 
[  252.503349] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=29900 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 MARK=0x3f00 
[  252.519074] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=29900 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 MARK=0x3f00 
[  252.534768] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=29900 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 MARK=0x3f00 
[  252.553980] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29906 PROTO=UDP SPT=53766 DPT=51888 LEN=264 
[  252.568674] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29906 PROTO=UDP SPT=53766 DPT=51888 LEN=264 MARK=0x3f00 
[  252.584232] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29906 PROTO=UDP SPT=53766 DPT=51888 LEN=264 MARK=0x3f00 
[  252.599747] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29906 PROTO=UDP SPT=53766 DPT=51888 LEN=264 MARK=0x3f00 
[  252.675091] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=29914 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 
[  252.689932] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=29914 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 MARK=0x3f00 
[  252.705673] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=29914 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 MARK=0x3f00 
[  252.721361] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=29914 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 MARK=0x3f00 
[  252.753382] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29915 PROTO=UDP SPT=53766 DPT=51888 LEN=328 
[  252.768055] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29915 PROTO=UDP SPT=53766 DPT=51888 LEN=328 MARK=0x3f00 
[  252.783622] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29915 PROTO=UDP SPT=53766 DPT=51888 LEN=328 MARK=0x3f00 
[  252.799139] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29915 PROTO=UDP SPT=53766 DPT=51888 LEN=328 MARK=0x3f00 
[  252.865110] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29920 PROTO=UDP SPT=53766 DPT=51888 LEN=392 
[  252.879799] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29920 PROTO=UDP SPT=53766 DPT=51888 LEN=392 MARK=0x3f00 
[  252.895370] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29920 PROTO=UDP SPT=53766 DPT=51888 LEN=392 MARK=0x3f00 
[  252.910887] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29920 PROTO=UDP SPT=53766 DPT=51888 LEN=392 MARK=0x3f00 
[  252.951684] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29924 PROTO=UDP SPT=53766 DPT=51888 LEN=456 
[  252.966358] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29924 PROTO=UDP SPT=53766 DPT=51888 LEN=456 MARK=0x3f00 
[  252.981930] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29924 PROTO=UDP SPT=53766 DPT=51888 LEN=456 MARK=0x3f00 
[  252.997445] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29924 PROTO=UDP SPT=53766 DPT=51888 LEN=456 MARK=0x3f00 
[  253.038968] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29929 PROTO=UDP SPT=53766 DPT=51888 LEN=520 
[  253.053649] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29929 PROTO=UDP SPT=53766 DPT=51888 LEN=520 MARK=0x3f00 
[  253.069215] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29929 PROTO=UDP SPT=53766 DPT=51888 LEN=520 MARK=0x3f00 
[  253.084746] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29929 PROTO=UDP SPT=53766 DPT=51888 LEN=520 MARK=0x3f00 
[  253.100904] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29935 PROTO=UDP SPT=53766 DPT=51888 LEN=584 
[  253.115603] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29935 PROTO=UDP SPT=53766 DPT=51888 LEN=584 MARK=0x3f00 
[  253.131154] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29935 PROTO=UDP SPT=53766 DPT=51888 LEN=584 MARK=0x3f00 
[  253.146669] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29935 PROTO=UDP SPT=53766 DPT=51888 LEN=584 MARK=0x3f00 
[  253.162729] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29938 PROTO=UDP SPT=53766 DPT=51888 LEN=648 
[  253.177408] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29938 PROTO=UDP SPT=53766 DPT=51888 LEN=648 MARK=0x3f00 
[  253.192957] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29938 PROTO=UDP SPT=53766 DPT=51888 LEN=648 MARK=0x3f00 
[  253.208470] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29938 PROTO=UDP SPT=53766 DPT=51888 LEN=648 MARK=0x3f00 
[  253.224456] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29943 PROTO=UDP SPT=53766 DPT=51888 LEN=712 
[  253.239157] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29943 PROTO=UDP SPT=53766 DPT=51888 LEN=712 MARK=0x3f00 
[  253.254736] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29943 PROTO=UDP SPT=53766 DPT=51888 LEN=712 MARK=0x3f00 
[  253.270239] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29943 PROTO=UDP SPT=53766 DPT=51888 LEN=712 MARK=0x3f00 
[  253.287451] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29945 PROTO=UDP SPT=53766 DPT=51888 LEN=776 
[  253.302141] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29945 PROTO=UDP SPT=53766 DPT=51888 LEN=776 MARK=0x3f00 
[  253.317689] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29945 PROTO=UDP SPT=53766 DPT=51888 LEN=776 MARK=0x3f00 
[  253.333198] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29945 PROTO=UDP SPT=53766 DPT=51888 LEN=776 MARK=0x3f00 
[  253.349109] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29950 PROTO=UDP SPT=53766 DPT=51888 LEN=136 
[  253.363799] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29950 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  253.379351] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29950 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  253.394863] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29950 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  253.410856] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=29952 PROTO=UDP SPT=53766 DPT=51888 LEN=840 
[  253.425530] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=29952 PROTO=UDP SPT=53766 DPT=51888 LEN=840 MARK=0x3f00 
[  253.441075] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=29952 PROTO=UDP SPT=53766 DPT=51888 LEN=840 MARK=0x3f00 
[  253.456588] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=29952 PROTO=UDP SPT=53766 DPT=51888 LEN=840 MARK=0x3f00 
[  253.472620] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29957 PROTO=UDP SPT=53766 DPT=51888 LEN=200 
[  253.487295] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29957 PROTO=UDP SPT=53766 DPT=51888 LEN=200 MARK=0x3f00 
[  253.502840] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29957 PROTO=UDP SPT=53766 DPT=51888 LEN=200 MARK=0x3f00 
[  253.518358] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=220 TOS=0x00 PREC=0x00 TTL=64 ID=29957 PROTO=UDP SPT=53766 DPT=51888 LEN=200 MARK=0x3f00 
[  253.534507] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=29960 PROTO=UDP SPT=53766 DPT=51888 LEN=904 
[  253.549184] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=29960 PROTO=UDP SPT=53766 DPT=51888 LEN=904 MARK=0x3f00 
[  253.564745] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=29960 PROTO=UDP SPT=53766 DPT=51888 LEN=904 MARK=0x3f00 
[  253.580254] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=29960 PROTO=UDP SPT=53766 DPT=51888 LEN=904 MARK=0x3f00 
[  253.598744] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29963 PROTO=UDP SPT=53766 DPT=51888 LEN=264 
[  253.613420] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29963 PROTO=UDP SPT=53766 DPT=51888 LEN=264 MARK=0x3f00 
[  253.628971] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29963 PROTO=UDP SPT=53766 DPT=51888 LEN=264 MARK=0x3f00 
[  253.644481] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=284 TOS=0x00 PREC=0x00 TTL=64 ID=29963 PROTO=UDP SPT=53766 DPT=51888 LEN=264 MARK=0x3f00 
[  253.660503] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=29966 PROTO=UDP SPT=53766 DPT=51888 LEN=968 
[  253.675177] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=29966 PROTO=UDP SPT=53766 DPT=51888 LEN=968 MARK=0x3f00 
[  253.690723] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=29966 PROTO=UDP SPT=53766 DPT=51888 LEN=968 MARK=0x3f00 
[  253.706235] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=29966 PROTO=UDP SPT=53766 DPT=51888 LEN=968 MARK=0x3f00 
[  253.722383] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29969 PROTO=UDP SPT=53766 DPT=51888 LEN=328 
[  253.737060] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29969 PROTO=UDP SPT=53766 DPT=51888 LEN=328 MARK=0x3f00 
[  253.752611] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29969 PROTO=UDP SPT=53766 DPT=51888 LEN=328 MARK=0x3f00 
[  253.768124] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=348 TOS=0x00 PREC=0x00 TTL=64 ID=29969 PROTO=UDP SPT=53766 DPT=51888 LEN=328 MARK=0x3f00 
[  253.784437] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=29970 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 
[  253.799290] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=29970 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 MARK=0x3f00 
[  253.815018] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=29970 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 MARK=0x3f00 
[  253.830702] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=29970 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 MARK=0x3f00 
[  253.847020] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29973 PROTO=UDP SPT=53766 DPT=51888 LEN=392 
[  253.861701] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29973 PROTO=UDP SPT=53766 DPT=51888 LEN=392 MARK=0x3f00 
[  253.877255] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29973 PROTO=UDP SPT=53766 DPT=51888 LEN=392 MARK=0x3f00 
[  253.892768] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=412 TOS=0x00 PREC=0x00 TTL=64 ID=29973 PROTO=UDP SPT=53766 DPT=51888 LEN=392 MARK=0x3f00 
[  253.908828] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=29978 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 
[  253.923677] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=29978 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 MARK=0x3f00 
[  253.939410] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=29978 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 MARK=0x3f00 
[  253.955099] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=29978 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 MARK=0x3f00 
[  253.971337] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29981 PROTO=UDP SPT=53766 DPT=51888 LEN=456 
[  253.986012] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29981 PROTO=UDP SPT=53766 DPT=51888 LEN=456 MARK=0x3f00 
[  254.001559] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29981 PROTO=UDP SPT=53766 DPT=51888 LEN=456 MARK=0x3f00 
[  254.017071] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=476 TOS=0x00 PREC=0x00 TTL=64 ID=29981 PROTO=UDP SPT=53766 DPT=51888 LEN=456 MARK=0x3f00 
[  254.033082] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=29985 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 
[  254.047933] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=29985 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 MARK=0x3f00 
[  254.063656] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=29985 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 MARK=0x3f00 
[  254.079340] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=29985 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 MARK=0x3f00 
[  254.095684] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29987 PROTO=UDP SPT=53766 DPT=51888 LEN=520 
[  254.110393] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29987 PROTO=UDP SPT=53766 DPT=51888 LEN=520 MARK=0x3f00 
[  254.125950] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29987 PROTO=UDP SPT=53766 DPT=51888 LEN=520 MARK=0x3f00 
[  254.141462] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=540 TOS=0x00 PREC=0x00 TTL=64 ID=29987 PROTO=UDP SPT=53766 DPT=51888 LEN=520 MARK=0x3f00 
[  254.157710] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=29991 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 
[  254.172571] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=29991 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 MARK=0x3f00 
[  254.188303] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=29991 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 MARK=0x3f00 
[  254.203990] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=29991 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 MARK=0x3f00 
[  254.220430] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29994 PROTO=UDP SPT=53766 DPT=51888 LEN=584 
[  254.235108] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29994 PROTO=UDP SPT=53766 DPT=51888 LEN=584 MARK=0x3f00 
[  254.250658] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29994 PROTO=UDP SPT=53766 DPT=51888 LEN=584 MARK=0x3f00 
[  254.266183] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=604 TOS=0x00 PREC=0x00 TTL=64 ID=29994 PROTO=UDP SPT=53766 DPT=51888 LEN=584 MARK=0x3f00 
[  254.301667] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29996 PROTO=UDP SPT=53766 DPT=51888 LEN=648 
[  254.316346] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29996 PROTO=UDP SPT=53766 DPT=51888 LEN=648 MARK=0x3f00 
[  254.331919] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29996 PROTO=UDP SPT=53766 DPT=51888 LEN=648 MARK=0x3f00 
[  254.347435] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=668 TOS=0x00 PREC=0x00 TTL=64 ID=29996 PROTO=UDP SPT=53766 DPT=51888 LEN=648 MARK=0x3f00 
[  254.379434] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29997 PROTO=UDP SPT=53766 DPT=51888 LEN=712 
[  254.394102] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29997 PROTO=UDP SPT=53766 DPT=51888 LEN=712 MARK=0x3f00 
[  254.409669] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29997 PROTO=UDP SPT=53766 DPT=51888 LEN=712 MARK=0x3f00 
[  254.425184] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=732 TOS=0x00 PREC=0x00 TTL=64 ID=29997 PROTO=UDP SPT=53766 DPT=51888 LEN=712 MARK=0x3f00 
[  254.465103] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29998 PROTO=UDP SPT=53766 DPT=51888 LEN=776 
[  254.479766] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29998 PROTO=UDP SPT=53766 DPT=51888 LEN=776 MARK=0x3f00 
[  254.495332] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29998 PROTO=UDP SPT=53766 DPT=51888 LEN=776 MARK=0x3f00 
[  254.510848] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=796 TOS=0x00 PREC=0x00 TTL=64 ID=29998 PROTO=UDP SPT=53766 DPT=51888 LEN=776 MARK=0x3f00 
[  254.526845] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=30004 PROTO=UDP SPT=53766 DPT=51888 LEN=840 
[  254.541534] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=30004 PROTO=UDP SPT=53766 DPT=51888 LEN=840 MARK=0x3f00 
[  254.557087] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=30004 PROTO=UDP SPT=53766 DPT=51888 LEN=840 MARK=0x3f00 
[  254.572599] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=860 TOS=0x00 PREC=0x00 TTL=64 ID=30004 PROTO=UDP SPT=53766 DPT=51888 LEN=840 MARK=0x3f00 
[  254.588587] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=30010 PROTO=UDP SPT=53766 DPT=51888 LEN=904 
[  254.603261] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=30010 PROTO=UDP SPT=53766 DPT=51888 LEN=904 MARK=0x3f00 
[  254.618811] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=30010 PROTO=UDP SPT=53766 DPT=51888 LEN=904 MARK=0x3f00 
[  254.634325] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=924 TOS=0x00 PREC=0x00 TTL=64 ID=30010 PROTO=UDP SPT=53766 DPT=51888 LEN=904 MARK=0x3f00 
[  254.652781] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=30015 PROTO=UDP SPT=53766 DPT=51888 LEN=968 
[  254.667459] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=30015 PROTO=UDP SPT=53766 DPT=51888 LEN=968 MARK=0x3f00 
[  254.683005] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=30015 PROTO=UDP SPT=53766 DPT=51888 LEN=968 MARK=0x3f00 
[  254.698517] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=988 TOS=0x00 PREC=0x00 TTL=64 ID=30015 PROTO=UDP SPT=53766 DPT=51888 LEN=968 MARK=0x3f00 
[  254.714503] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=30018 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 
[  254.729374] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=30018 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 MARK=0x3f00 
[  254.745106] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=30018 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 MARK=0x3f00 
[  254.760792] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1052 TOS=0x00 PREC=0x00 TTL=64 ID=30018 PROTO=UDP SPT=53766 DPT=51888 LEN=1032 MARK=0x3f00 
[  254.777014] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=30024 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 
[  254.791881] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=30024 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 MARK=0x3f00 
[  254.807608] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=30024 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 MARK=0x3f00 
[  254.823300] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1116 TOS=0x00 PREC=0x00 TTL=64 ID=30024 PROTO=UDP SPT=53766 DPT=51888 LEN=1096 MARK=0x3f00 
[  254.839564] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=30028 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 
[  254.854413] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=30028 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 MARK=0x3f00 
[  254.870135] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=30028 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 MARK=0x3f00 
[  254.885822] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1180 TOS=0x00 PREC=0x00 TTL=64 ID=30028 PROTO=UDP SPT=53766 DPT=51888 LEN=1160 MARK=0x3f00 
[  254.902179] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=30030 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 
[  254.917032] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=30030 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 MARK=0x3f00 
[  254.932758] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=30030 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 MARK=0x3f00 
[  254.948444] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=1244 TOS=0x00 PREC=0x00 TTL=64 ID=30030 PROTO=UDP SPT=53766 DPT=51888 LEN=1224 MARK=0x3f00 
[  264.799728] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=204 TOS=0x08 PREC=0xC0 TTL=64 ID=54429 PROTO=ICMP TYPE=3 CODE=3 [SRC=173.242.119.141 DST=180.112.50.137 LEN=176 TOS=0x08 PREC=0x00 TTL=54 ID=42189 PROTO=UDP SPT=51888 DPT=53766 LEN=156 ] 
[  264.823990] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=204 TOS=0x08 PREC=0xC0 TTL=64 ID=54429 PROTO=ICMP TYPE=3 CODE=3 [SRC=173.242.119.141 DST=180.112.50.137 LEN=176 TOS=0x08 PREC=0x00 TTL=54 ID=42189 PROTO=UDP SPT=51888 DPT=53766 LEN=156 ] MARK=0x3f00 
[  264.849151] postroute startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=204 TOS=0x08 PREC=0xC0 TTL=64 ID=54429 PROTO=ICMP TYPE=3 CODE=3 [SRC=173.242.119.141 DST=180.112.50.137 LEN=176 TOS=0x08 PREC=0x00 TTL=54 ID=42189 PROTO=UDP SPT=51888 DPT=53766 LEN=156 ] MARK=0x3f00 
[  264.874691] postroute endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=204 TOS=0x08 PREC=0xC0 TTL=64 ID=54429 PROTO=ICMP TYPE=3 CODE=3 [SRC=173.242.119.141 DST=180.112.50.137 LEN=176 TOS=0x08 PREC=0x00 TTL=54 ID=42189 PROTO=UDP SPT=51888 DPT=53766 LEN=156 ] MARK=0x3f00 
[  266.067228] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=30890 PROTO=UDP SPT=53766 DPT=51888 LEN=156 
[  266.081894] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=30890 PROTO=UDP SPT=53766 DPT=51888 LEN=156 MARK=0x3f00 
[  266.097450] postroute startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=30890 PROTO=UDP SPT=53766 DPT=51888 LEN=156 MARK=0x3f00 
[  266.113415] postroute endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=30890 PROTO=UDP SPT=53766 DPT=51888 LEN=156 MARK=0x3f00 
[  270.171048] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=204 TOS=0x08 PREC=0xC0 TTL=64 ID=54710 PROTO=ICMP TYPE=3 CODE=3 [SRC=173.242.119.141 DST=180.112.50.137 LEN=176 TOS=0x08 PREC=0x00 TTL=54 ID=42218 PROTO=UDP SPT=51888 DPT=53766 LEN=156 ] 
[  270.195326] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=204 TOS=0x08 PREC=0xC0 TTL=64 ID=54710 PROTO=ICMP TYPE=3 CODE=3 [SRC=173.242.119.141 DST=180.112.50.137 LEN=176 TOS=0x08 PREC=0x00 TTL=54 ID=42218 PROTO=UDP SPT=51888 DPT=53766 LEN=156 ] MARK=0x3f00 
[  270.220481] postroute startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=204 TOS=0x08 PREC=0xC0 TTL=64 ID=54710 PROTO=ICMP TYPE=3 CODE=3 [SRC=173.242.119.141 DST=180.112.50.137 LEN=176 TOS=0x08 PREC=0x00 TTL=54 ID=42218 PROTO=UDP SPT=51888 DPT=53766 LEN=156 ] MARK=0x3f00 
[  270.246034] postroute endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=204 TOS=0x08 PREC=0xC0 TTL=64 ID=54710 PROTO=ICMP TYPE=3 CODE=3 [SRC=173.242.119.141 DST=180.112.50.137 LEN=176 TOS=0x08 PREC=0x00 TTL=54 ID=42218 PROTO=UDP SPT=51888 DPT=53766 LEN=156 ] MARK=0x3f00 
[  271.826512] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=31053 PROTO=UDP SPT=53766 DPT=51888 LEN=156 
[  271.841192] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=31053 PROTO=UDP SPT=53766 DPT=51888 LEN=156 MARK=0x3f00 
[  271.856764] postroute startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=31053 PROTO=UDP SPT=53766 DPT=51888 LEN=156 MARK=0x3f00 
[  271.872726] postroute endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=176 TOS=0x08 PREC=0x80 TTL=64 ID=31053 PROTO=UDP SPT=53766 DPT=51888 LEN=156 MARK=0x3f00 
[  272.028888] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=31070 PROTO=UDP SPT=53766 DPT=51888 LEN=40 
[  272.043384] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=31070 PROTO=UDP SPT=53766 DPT=51888 LEN=40 MARK=0x3f00 
[  272.058765] postroute startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=31070 PROTO=UDP SPT=53766 DPT=51888 LEN=40 MARK=0x3f00 
[  272.074541] postroute endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=31070 PROTO=UDP SPT=53766 DPT=51888 LEN=40 MARK=0x3f00

@aaronjg
Copy link
Contributor

aaronjg commented Jul 12, 2020

Got it. So now we can see that that it is for some reason trying to route the encrypted vpn traffic back through the VPN. You can see that the log with mwan3 is much longer than the log without. After the first successful ping, each ping attempt triggers a cascade of 17 packets, each 64 bytes longer than the previous.

Is your VPN perhaps connected on port 443? If so can you delete the rule titled 'https?'

@wackejohn
Copy link
Author

@aaronjg

Is your VPN perhaps connected on port 443? If so can you delete the rule titled 'https?'

Nope. My VPN was configred on port 51888 udp, as the log showed, while the https is tcp port.

@aaronjg
Copy link
Contributor

aaronjg commented Jul 13, 2020

Many VPNs use port 443 (https port) to avoid being blocked by ISP firewalls. Is any part of your connection going over 443 or https? You included it in the minimal config - so I was wondering what it is needed for.

Something still seems wrong from the IP tables log:

SRC:180.112.50.137 DEST: 173.242.119.141

From the routing table:

117.85.168.1 dev pppoe-wan proto kernel scope link src 117.85.170.4 
173.242.119.141 via 117.85.168.1 dev pppoe-wan proto static 

Do you have any idea why the packets are getting assigned a source address of 180.112.50.137? From your routing table, it looks like the src for ppoe-wan should be 117.85.170.4

Another thing that looks weird is your mwan3 config has both a wan and a wana device, but the wana device is not part of any used policy. Can you confirm that this is in fact the minimal configuration to reproduce the bug?

@wackejohn
Copy link
Author

@aaronjg

Many VPNs use port 443 (https port) to avoid being blocked by ISP firewalls. Is any part of your connection going over 443 or https?

I'm using the wireguard vpn, and when I use other vpns with tun device, the ping -I actually working, so I open this issue.

You included it in the minimal config - so I was wondering what it is needed for.

The https rule was generated by the mwan3, so it was one of the default rule of mwan3.

117.85.168.1 dev pppoe-wan proto kernel scope link src 117.85.170.4
173.242.119.141 via 117.85.168.1 dev pppoe-wan proto static

Because I capture the routing table and the log at the different time, so the ip addr was different, but this shouldn't matter, please ignore the different ip addr.

Another thing that looks weird is your mwan3 config has both a wan and a wana device, but the wana device is not part of any used policy. Can you confirm that this is in fact the minimal configuration to reproduce the bug?

Yes, with the default rule of mwan3, the ping -I won't working until stop the mwan3 (or use the 4.14 kernel and below).

@aaronjg
Copy link
Contributor

aaronjg commented Jul 13, 2020

Because I capture the routing table and the log at the different time, so the ip addr was different, but this shouldn't matter, please ignore the different ip addr.

When things change like this, it makes it very difficult to help. To identify the issue, we have to look for anomolies and these changes look very much like something when wrong in mwan3.

Yes, with the default rule of mwan3, the ping -I won't working until stop the mwan3 (or use the 4.14 kernel and below).
A "minimal configuration" is the smallest possible configuration which gives the problematic behavior. To get a minimal configuration, you need to delete sections of the configuration until you can no longer reproduce the bug. (Either things start working again, or it breaks because some key configuration is missing). Some of these sections appear extraneous (eg policies that are not part of any rule). Which is why I asked if it was the minimal configuration.

Anyway, since you have added back the direct link route, and confirmed that the IP address from the log matches the correct outgoing IP address of your ppoe device - it appears that mwan3 is doing everything correctly. Unfortunately, this means that you have found a bug in wireguard or the kernel routing.

You can actually see it here:

[  250.186954] output startIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29827 PROTO=UDP SPT=53766 DPT=51888 LEN=136 
[  250.201625] output endIN= OUT=pppoe-wan SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29827 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  250.217190] postroute startIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29827 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 
[  250.232704] postroute endIN= OUT=wana SRC=180.112.50.137 DST=173.242.119.141 LEN=156 TOS=0x00 PREC=0x00 TTL=64 ID=29827 PROTO=UDP SPT=53766 DPT=51888 LEN=136 MARK=0x3f00 

So this packet gets marked correctly by iptables with 0x3f0. You never shared the output of ip rule list from the smaller (minimal?) configuration. But assuming nothing crazy is going on here, that firewall mark should skip the tables mwan3 added and match the main routing table.

The main routing table is (with 117.85.170.4 replaced with 180.112.50.137 presumably, and the corresponding gateway also replaced.):

default via 117.85.168.1 dev pppoe-wan proto static 
10.10.1.0/24 dev wana proto static scope link metric 10 
117.85.168.1 dev pppoe-wan proto kernel scope link src 117.85.170.4 
173.242.119.141 via 117.85.168.1 dev pppoe-wan proto static 
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1 

So that packet should match the fourth rule in the table and be routed out of ppoe. Somehow it appears to not matching that rule and being routed out of wana - which causes it to go back through ppoe.

So it appears that this is an issue upstream, either with wireguard or the kernel. You should try to create a minimal configuration without mwan3 to reproduce this, and post a bug report on the main openwrt project. A minimal configuration will likely contain:

  • One iptable command to mark the packets
  • A few ip route add ... table 1 commands to create a new routing table. experiment with this to see which rules are needed to reproduce this
  • One ip rule add ... table 1 command to add a rule to the routing table.

If you can't get it with those rules, you may need a few more commands to reproduce the behavior - but try to recreate the behavior with as few commands as possible since that will make it easier for the openwrt developers to help out.

@ptpt52
Copy link
Contributor

ptpt52 commented Aug 8, 2020

@wackejohn hi
in ip route
why no default route for wana? this is not correct
so in ip route list table 9

default dev wana scope link metric 30  <<== This line is not correct


10.10.1.0/24 dev wana proto static scope link metric 30 
31.40.214.127 via 180.115.231.1 dev pppoe-wan1 proto static metric 10 
112.1.96.1 dev pppoe-wan3 proto kernel scope link src 112.1.96.195 
112.3.84.1 dev pppoe-wan4 proto kernel scope link src 112.3.87.193 
114.228.153.1 dev pppoe-wan2 proto kernel scope link src 114.228.153.129 
173.242.119.141 via 180.115.231.1 dev pppoe-wan1 proto static metric 10 
180.115.231.1 dev pppoe-wan1 proto kernel scope link src 180.115.231.180 
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1 
192.168.2.0/24 dev vpn1 proto static scope link metric 110 
192.168.3.0/24 dev vpn1 proto static scope link metric 110 
192.168.150.0/24 dev wanb proto static scope link metric 40 
192.168.195.0/24 dev vpn0 proto static scope link metric 100 
192.168.195.2 dev vpn0 proto static scope link metric 100 
192.168.195.3 dev vpn0 proto static scope link metric 100 
192.168.195.4 dev vpn0 proto static scope link metric 100 
192.168.195.5 dev vpn0 proto static scope link metric 100 
192.168.195.6 dev vpn0 proto static scope link metric 100 
192.168.196.0/24 dev vpn1 proto static scope link metric 110 
192.168.196.2 dev vpn1 proto static scope link metric 110 
192.168.196.3 dev vpn1 proto static scope link metric 110 

It should be like: default via 10.10.1.xx dev wana proto static metric 30
you need to add it to main table and restart mwan3
and mwan3rtmon should copy it to table 9

and if you don't want all traffic go out via wana, you could set the metric large number

@aaronjg
Copy link
Contributor

aaronjg commented Aug 10, 2020

you need to add it to main table and restart mwan3
and mwan3rtmon should copy it to table 9

mwan3 does not copy over the default routes, it just inserts its own.

and if you don't want all traffic go out via wana, you could set the metric large number

With only one default route, changing the metric on the default route will not change the traffic routing

@wackejohn
Copy link
Author

Thanks @aaronjg, with this pr and add default route of wireguard interface to main routing table ,this issue is fixed now.

@ptpt52
Copy link
Contributor

ptpt52 commented Oct 26, 2020

ping -I should work, so it is bug in wireguard
@wackejohn
Please try test my new fix for it
https://github.com/x-wrt/x-wrt/blob/master/package/network/services/wireguard/patches/100-skb-sock-sync-sk_bound_dev_if.patch

@wackejohn
Copy link
Author

@ptpt52
Tried, but still have bugs working with two or more wireguard links.

The ttl was different from wana (121) to wanb (116):

root@HOME-Router_CZ:/etc/config# ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=121 time=135.858 ms
64 bytes from 8.8.8.8: seq=1 ttl=116 time=136.189 ms
64 bytes from 8.8.8.8: seq=2 ttl=116 time=136.097 ms
64 bytes from 8.8.8.8: seq=3 ttl=116 time=135.867 ms
64 bytes from 8.8.8.8: seq=4 ttl=116 time=137.416 ms
64 bytes from 8.8.8.8: seq=5 ttl=116 time=137.491 ms
64 bytes from 8.8.8.8: seq=6 ttl=116 time=135.676 ms
64 bytes from 8.8.8.8: seq=7 ttl=116 time=135.557 ms
64 bytes from 8.8.8.8: seq=8 ttl=116 time=135.830 ms
64 bytes from 8.8.8.8: seq=9 ttl=116 time=139.063 ms
64 bytes from 8.8.8.8: seq=10 ttl=116 time=135.592 ms
64 bytes from 8.8.8.8: seq=11 ttl=116 time=135.746 ms
^C
--- 8.8.8.8 ping statistics ---
12 packets transmitted, 12 packets received, 0% packet loss
round-trip min/avg/max = 135.557/136.365/139.063 ms
root@HOME-Router_CZ:/etc/config# ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=121 time=133.802 ms
64 bytes from 8.8.8.8: seq=1 ttl=116 time=136.936 ms
64 bytes from 8.8.8.8: seq=2 ttl=116 time=136.612 ms
64 bytes from 8.8.8.8: seq=3 ttl=116 time=138.964 ms
64 bytes from 8.8.8.8: seq=4 ttl=116 time=136.239 ms
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 133.802/136.510/138.964 ms
root@HOME-Router_CZ:/etc/config# ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=121 time=133.633 ms
64 bytes from 8.8.8.8: seq=1 ttl=116 time=136.060 ms
64 bytes from 8.8.8.8: seq=2 ttl=116 time=135.999 ms
64 bytes from 8.8.8.8: seq=3 ttl=116 time=136.289 ms
64 bytes from 8.8.8.8: seq=4 ttl=116 time=135.918 ms
64 bytes from 8.8.8.8: seq=5 ttl=116 time=135.588 ms
64 bytes from 8.8.8.8: seq=6 ttl=116 time=135.867 ms
64 bytes from 8.8.8.8: seq=7 ttl=116 time=136.036 ms
64 bytes from 8.8.8.8: seq=8 ttl=116 time=135.913 ms
^C
--- 8.8.8.8 ping statistics ---
9 packets transmitted, 9 packets received, 0% packet loss
round-trip min/avg/max = 133.633/135.700/136.289 ms
root@HOME-Router_CZ:/etc/config# mwan3 ifup wana
root@HOME-Router_CZ:/etc/config# ping -I wanb 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=116 time=136.261 ms
64 bytes from 8.8.8.8: seq=1 ttl=121 time=137.569 ms
64 bytes from 8.8.8.8: seq=2 ttl=121 time=135.139 ms
64 bytes from 8.8.8.8: seq=3 ttl=121 time=133.616 ms
64 bytes from 8.8.8.8: seq=4 ttl=121 time=134.030 ms
64 bytes from 8.8.8.8: seq=5 ttl=121 time=133.919 ms
64 bytes from 8.8.8.8: seq=6 ttl=121 time=134.292 ms
64 bytes from 8.8.8.8: seq=7 ttl=121 time=133.984 ms
64 bytes from 8.8.8.8: seq=8 ttl=121 time=139.795 ms
64 bytes from 8.8.8.8: seq=9 ttl=121 time=133.475 ms
64 bytes from 8.8.8.8: seq=10 ttl=121 time=135.308 ms
64 bytes from 8.8.8.8: seq=11 ttl=121 time=135.950 ms
64 bytes from 8.8.8.8: seq=12 ttl=121 time=134.733 ms
64 bytes from 8.8.8.8: seq=13 ttl=121 time=137.229 ms
64 bytes from 8.8.8.8: seq=14 ttl=121 time=134.602 ms
64 bytes from 8.8.8.8: seq=15 ttl=121 time=139.457 ms
64 bytes from 8.8.8.8: seq=16 ttl=121 time=133.962 ms
64 bytes from 8.8.8.8: seq=17 ttl=121 time=137.164 ms
64 bytes from 8.8.8.8: seq=18 ttl=121 time=135.839 ms
^C
--- 8.8.8.8 ping statistics ---
19 packets transmitted, 19 packets received, 0% packet loss
round-trip min/avg/max = 133.475/135.596/139.795 ms
root@HOME-Router_CZ:/etc/config# ifdown wanb
root@HOME-Router_CZ:/etc/config# ping -I wanb 8.8.8.8
ping: bad address 'wanb'
root@HOME-Router_CZ:/etc/config# ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=121 time=134.590 ms
64 bytes from 8.8.8.8: seq=1 ttl=121 time=134.660 ms
64 bytes from 8.8.8.8: seq=2 ttl=121 time=133.850 ms
64 bytes from 8.8.8.8: seq=3 ttl=121 time=140.986 ms
64 bytes from 8.8.8.8: seq=4 ttl=121 time=135.351 ms
64 bytes from 8.8.8.8: seq=5 ttl=121 time=133.815 ms
64 bytes from 8.8.8.8: seq=6 ttl=121 time=141.610 ms
64 bytes from 8.8.8.8: seq=7 ttl=121 time=133.842 ms
64 bytes from 8.8.8.8: seq=8 ttl=121 time=133.694 ms
64 bytes from 8.8.8.8: seq=9 ttl=121 time=133.862 ms
^C
--- 8.8.8.8 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 133.694/135.626/141.610 ms
root@HOME-Router_CZ:/etc/config# ifup wanb
root@HOME-Router_CZ:/etc/config# ifdown wana
root@HOME-Router_CZ:/etc/config# ping -I wanb 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=116 time=136.513 ms
64 bytes from 8.8.8.8: seq=1 ttl=116 time=137.159 ms
64 bytes from 8.8.8.8: seq=2 ttl=116 time=136.090 ms
64 bytes from 8.8.8.8: seq=3 ttl=116 time=137.653 ms
64 bytes from 8.8.8.8: seq=4 ttl=116 time=136.160 ms
64 bytes from 8.8.8.8: seq=5 ttl=116 time=136.246 ms
64 bytes from 8.8.8.8: seq=6 ttl=116 time=135.954 ms
64 bytes from 8.8.8.8: seq=7 ttl=116 time=136.978 ms
64 bytes from 8.8.8.8: seq=8 ttl=116 time=136.383 ms
64 bytes from 8.8.8.8: seq=9 ttl=116 time=135.880 ms
64 bytes from 8.8.8.8: seq=10 ttl=116 time=136.031 ms
^C
--- 8.8.8.8 ping statistics ---
11 packets transmitted, 11 packets received, 0% packet loss
round-trip min/avg/max = 135.880/136.458/137.653 ms

@ptpt52
Copy link
Contributor

ptpt52 commented Oct 26, 2020

@wackejohn ttl is the issue?
Seems to be normal, in a real network environment

@wackejohn
Copy link
Author

@ptpt52
I think the ping packets was sent to wanb when ping -I wana (cause the ttl was changed from the secound ping, but when I ifdown wana or wanb manually, the ttl was normal).

@ptpt52
Copy link
Contributor

ptpt52 commented Oct 26, 2020

@wackejohn
try this change and test again

diff --git a/package/network/services/wireguard/patches/100-skb-sock-sync-sk_bound_dev_if.patch b/package/network/services/wireguard/patches/100-skb-sock-sync-sk_bound_dev_if.
index c5ca454709..9cfb31194e 100644
--- a/package/network/services/wireguard/patches/100-skb-sock-sync-sk_bound_dev_if.patch
+++ b/package/network/services/wireguard/patches/100-skb-sock-sync-sk_bound_dev_if.patch
@@ -10,7 +10,7 @@ index c33e2c8..6c7476e 100644
 +              /* Can't call skb->destructor here in irq
 +               * so we just hack sync sk_bound_dev_if
 +               */
-+              skb->sk->sk_bound_dev_if = sock->sk_bound_dev_if;
++              skb->sk->sk_bound_dev_if = 0;
 +      }
        udp_tunnel_xmit_skb(rt, sock, skb, fl.saddr, fl.daddr, ds,
                            ip4_dst_hoplimit(&rt->dst), 0, fl.fl4_sport,
@@ -23,7 +23,7 @@ index c33e2c8..6c7476e 100644
 +              /* Can't call skb->destructor here in irq
 +               * so we just hack sync sk_bound_dev_if
 +               */
-+              skb->sk->sk_bound_dev_if = sock->sk_bound_dev_if;
++              skb->sk->sk_bound_dev_if = 0;
 +      }
        udp_tunnel6_xmit_skb(dst, sock, skb, skb->dev, &fl.saddr, &fl.daddr, ds,
                             ip6_dst_hoplimit(dst), 0, fl.fl6_sport,

@wackejohn
Copy link
Author

@ptpt52
It's working.

root@HOME-Router_CZ:~# ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=121 time=147.073 ms
64 bytes from 8.8.8.8: seq=1 ttl=121 time=136.372 ms
64 bytes from 8.8.8.8: seq=2 ttl=121 time=135.890 ms
64 bytes from 8.8.8.8: seq=3 ttl=121 time=135.242 ms
64 bytes from 8.8.8.8: seq=4 ttl=121 time=135.578 ms
64 bytes from 8.8.8.8: seq=5 ttl=121 time=141.975 ms
64 bytes from 8.8.8.8: seq=6 ttl=121 time=136.291 ms
64 bytes from 8.8.8.8: seq=7 ttl=121 time=135.744 ms
64 bytes from 8.8.8.8: seq=8 ttl=121 time=137.404 ms
^C
--- 8.8.8.8 ping statistics ---
9 packets transmitted, 9 packets received, 0% packet loss
round-trip min/avg/max = 135.242/137.952/147.073 ms
root@HOME-Router_CZ:~# ping -I wanb 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=116 time=137.485 ms
64 bytes from 8.8.8.8: seq=1 ttl=121 time=137.247 ms
64 bytes from 8.8.8.8: seq=2 ttl=121 time=136.739 ms
64 bytes from 8.8.8.8: seq=3 ttl=121 time=137.696 ms
64 bytes from 8.8.8.8: seq=4 ttl=121 time=136.210 ms
64 bytes from 8.8.8.8: seq=5 ttl=121 time=136.195 ms
64 bytes from 8.8.8.8: seq=6 ttl=121 time=135.757 ms
64 bytes from 8.8.8.8: seq=7 ttl=121 time=135.749 ms
64 bytes from 8.8.8.8: seq=8 ttl=121 time=139.680 ms
^C
--- 8.8.8.8 ping statistics ---
9 packets transmitted, 9 packets received, 0% packet loss
round-trip min/avg/max = 135.749/136.973/139.680 ms

@ptpt52
Copy link
Contributor

ptpt52 commented Oct 26, 2020

Please do more test, I notice one line ttl=116 in ping -I wanb

@ptpt52
Copy link
Contributor

ptpt52 commented Oct 26, 2020

can you show your network?

ip route

@ptpt52
Copy link
Contributor

ptpt52 commented Oct 26, 2020

you could mask the ip

@wackejohn
Copy link
Author

wackejohn commented Oct 26, 2020

root@HOME-Router_CZ:~# ip route
default via 114.228.*.* dev pppoe-wan1 proto static metric 10 
default via 222.188.*.* dev pppoe-wan2 proto static metric 15 
default via 223.66.*.* dev pppoe-wan3 proto static metric 20 
default via 112.1.*.1* dev pppoe-wan4 proto static metric 25 
default via 10.10.1.1 dev wana proto static metric 30 
default via 192.168.150.1 dev wanb proto static metric 40 
10.10.1.0/24 dev wana proto static scope link metric 30 
112.1.*.* dev pppoe-wan4 proto kernel scope link src 112.1.*.* 
114.228.*.* dev pppoe-wan1 proto kernel scope link src 114.228.*.* 
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1 
192.168.2.0/24 dev vpn1 proto static scope link metric 110 
192.168.3.0/24 dev vpn1 proto static scope link metric 110 
192.168.150.0/24 dev wanb proto static scope link metric 40 
192.168.195.0/24 dev vpn0 proto static scope link metric 100 
192.168.195.2 dev vpn0 proto static scope link metric 100 
192.168.195.3 dev vpn0 proto static scope link metric 100 
192.168.195.4 dev vpn0 proto static scope link metric 100 
192.168.195.5 dev vpn0 proto static scope link metric 100 
192.168.195.6 dev vpn0 proto static scope link metric 100 
192.168.196.0/24 dev vpn1 proto static scope link metric 110 
192.168.196.2 dev vpn1 proto static scope link metric 110 
192.168.196.3 dev vpn1 proto static scope link metric 110 
222.188.*.* dev pppoe-wan2 proto kernel scope link src 222.188.*.*
223.66.*.* dev pppoe-wan3 proto kernel scope link src 223.66.*.*

@ptpt52
Copy link
Contributor

ptpt52 commented Oct 26, 2020

@wackejohn
Copy link
Author

@ptpt52
Working.

root@HOME-Router_CZ:~# ping -I wana 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=121 time=135.233 ms
64 bytes from 8.8.8.8: seq=1 ttl=121 time=135.210 ms
64 bytes from 8.8.8.8: seq=2 ttl=121 time=134.916 ms
64 bytes from 8.8.8.8: seq=3 ttl=121 time=135.305 ms
64 bytes from 8.8.8.8: seq=4 ttl=121 time=135.863 ms
64 bytes from 8.8.8.8: seq=5 ttl=121 time=135.562 ms
64 bytes from 8.8.8.8: seq=6 ttl=121 time=134.961 ms
64 bytes from 8.8.8.8: seq=7 ttl=121 time=135.389 ms
64 bytes from 8.8.8.8: seq=8 ttl=121 time=135.052 ms
^C
--- 8.8.8.8 ping statistics ---
9 packets transmitted, 9 packets received, 0% packet loss
round-trip min/avg/max = 134.916/135.276/135.863 ms
root@HOME-Router_CZ:~# ping -I wanb 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=116 time=136.593 ms
64 bytes from 8.8.8.8: seq=1 ttl=116 time=135.974 ms
64 bytes from 8.8.8.8: seq=2 ttl=116 time=136.143 ms
64 bytes from 8.8.8.8: seq=3 ttl=116 time=136.279 ms
64 bytes from 8.8.8.8: seq=4 ttl=116 time=136.264 ms
64 bytes from 8.8.8.8: seq=5 ttl=116 time=136.204 ms
64 bytes from 8.8.8.8: seq=6 ttl=116 time=135.992 ms
64 bytes from 8.8.8.8: seq=7 ttl=116 time=136.520 ms
64 bytes from 8.8.8.8: seq=8 ttl=116 time=136.105 ms
64 bytes from 8.8.8.8: seq=9 ttl=116 time=136.008 ms
64 bytes from 8.8.8.8: seq=10 ttl=116 time=135.789 ms
^C
--- 8.8.8.8 ping statistics ---
11 packets transmitted, 11 packets received, 0% packet loss
round-trip min/avg/max = 135.789/136.170/136.593 ms

@ptpt52
Copy link
Contributor

ptpt52 commented Oct 27, 2020 via email

@feckert
Copy link
Member

feckert commented Oct 27, 2020

@ptpt52 This is a wireguard problem and has nothing to do with the mwan3?
Can you please send it upstream, so that it gets fixed in the wireguard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants