Bill
July 26, 2022, 12:33am
2
Sorry I put the chicken egg thing out of order:
If the Wireguard tunnel on your router is used as default routing (for the whole internet), sadly no vpn-policy-routing
rule will allow it to intercept and properly route the UDP
traffic of Wireguard server, please either use the OpenVPN server and configure it to use TCP
protocol or use the Scenario 2 below.
Otherwise you'll have to incorporate something like this:
In addition to the above perhaps this example might help provide inspiration:
The idea is to set a routing table for each interface and then set rules for routing packets through each interface.
I think the reason your rule above doesn't work is because it lacks a routing table for VPN.
So I think you should label tables as described here:
Here are mine:
root@OpenWrt:~# cat /etc/iproute2/rt_tables
#
# reserved values
#
128 prelocal
255 local
254 main
253 default
0 …
or this
You need to do Policy Based Routing and you have 3 options:
mwan3 package
pbr package
a set of rules/routes for each internet connection.
In your case you have not filled in the rule properly. You need to specify Incoming Interface, Source IP, and the Table. Then in static IPv4 Routes you need to add a default route and any local routes for that Table.
WireGuard Issues in VPN Policy-Based Routing
https://docs.openwrt.melmac.net/vpn-policy-routing/#local-wireguard-server--wireguard-client-scenario-1
A Word About Default Routing
From the author's page
https://docs.openwrt.melmac.net/vpn-policy-routing/#a-word-about-default-routing
and the pictures show the gateways:
https://docs.openwrt.melmac.net/vpn-policy-routing/screenshots/01-status.png
What does your say/show?