I'm trying to use wireguard vpn with NetworkManage, but i have a problem with routes. When I connect with exact same settings via wg-quick, it works perfectly, but NetworkManager adds unneeded routes as I may see, and i just want to know how to prevent it from doing so. wireguard uses fwmark, and i think this routes from networkmanager just break everything.
NetworkManager wireguard plugin I use: https://github.com/max-moser/network-manager-wireguard
So, when i connect via network-manager, I can access the VPN server itself via vpn network, but all traffic still goes as there is no vpn. When connected via wg-quick everything works as expected.
Output of ip r and route -n when connected from NetworkManager:
default via 192.168.0.1 dev wlo1 proto dhcp metric 600
10.100.100.0/24 dev usa proto kernel scope link src 10.100.100.2 metric 50
169.254.0.0/16 dev wlo1 scope link metric 1000
192.168.0.0/24 dev wlo1 proto kernel scope link src 192.168.0.100 metric 600
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 600 0 0 wlo1
10.100.100.0 0.0.0.0 255.255.255.0 U 50 0 0 usa
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlo1
192.168.0.0 0.0.0.0 255.255.255.0 U 600 0 0 wlo1
When connected with wg-quick up:
default via 192.168.0.1 dev wlo1 proto dhcp metric 600
169.254.0.0/16 dev wlo1 scope link metric 1000
192.168.0.0/24 dev wlo1 proto kernel scope link src 192.168.0.100 metric 600
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 600 0 0 wlo1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlo1
192.168.0.0 0.0.0.0 255.255.255.0 U 600 0 0 wlo1