mwan3: issue with wireguard and subnet routing.
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
I have been using mwan3 to failover traffic over two wans on my router for a while. But right now I've made two changes that are causing troubles, 1 is upgrading to 20.2 and 2 is switching my VPN to wireguard.
I have a wireguard setup up and working with 4 peers, one is a client the other two are dad's home to access the lan, and my VPS which I want to route some traffic through.
I have only one rule (depending on only one policy with one member) to route a certain subnet in my network through the VPN (I'm not routing all my traffic). I have a 192.168.8.0/23 network and I want to route all 192.168.9.x IPs via the VPN.
The inital setup (today) was working in 18.06, but then I decided to finally brave it and upgrade to 20.2. And it's not working.
After lots and lots of tests and tcpdump and everything I decided to do something... wireguard interfaces (aparently) do not have default gateways. I have 3 peers, but only one of the peers, my vps, has 0.0.0.0/0 on its allowed IPs, and it's the only peer whose add routes is deselected (all other peers need it selected to access their in-vpn ip or their lans. I don't want to use my VPS as a hub).
I thought the presence of this 0.0.0.0/0 would be enough, if the package is handed to the interface, but apparently not. i did the test of manualy adding a default route to the table that mwan3 configured for this member, and everything started working:
ip route add table 4 0.0.0/0 dev wireguard via 10.42.42.1
My question is, is this really necessary then? and if so, how can I add this "default gw" (I was supposing internal routing from the wg interface should just have taken over) in a way that's automated, and integrates well with mwan3 please.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the subnet-routing setup with mwan3, the WireGuard interface, and the policy table shown in the report. Inspect the generated routing table and compare it with the manual ip route add table 4 0.0.0/0 dev wireguard via 10.42.42.1 workaround. Done means the selected subnet routes through the VPN automatically and remains integrated with mwan3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100