TP-Link Archer MR200, two WAN methods and wireguard

I successfully flash OpenWRT FW into the TP link Archer MR 200 v1.0 router. I want the WAN to work in two modes.

Mode 1: WAN LTE modem
Mode 2: WAN port LAN / WAN (LAN4)

Either mod1 or mod2 will work (of course not at the same time).
First I set mod e (LAN / WAN) according to Unable to connect to internet. No port forwarding WAN to LAN? - #18 by d0st
Next, I installed and configured the wireguard. Internet on LAN 1,2,3 also works well via wifi. However, the wireguard does not work.

If I use mode1 and insert a SIM card into the LTE modem, everything works both the internet and the wireguard.

I don't know where the problem may be. If necessary, I can paste here /etc/config/firewall and /etc/config/network

I managed to solve it, but I don't know the explanation.
When I stop the WAN interface (LTE modem), then the wireguard also starts working.

Wireguard binds to an interface.

Does this mean that WAN (usb0 (LTE)) is the default?
If I stop the WAN (usb0 (LTE)) then WAN (eth0.2 (WAN/LAN4)) will become the default?
How can I solve this?
If no SIM card is inserted in the LTE modem, so that the WAN (usb0) is stopped.

TBH, I'm still testing/troubleshooting this issue with a slightly similar problem. I have an 6in4 tunnel and eth1, Wireguard bind to the 6in4 tunnel and uses its IP.

I was able to make a static route for the single DST IP to use the eth instead.

Hope this helps.

I found that after starting the system I have to restart the interface

ifup wanlan4

How to set it so that this command runs automatically after the system starts?

Add to /etc/rc.local

vi /etc/rc.local

sleep 16
ifup wanlan4
sleep 4
ifup wg0

exit 0

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.