I have a Rapsberry Pi with PiOS. My idea is to install WireGuard on it and route all traffic through WireGuard. I have set the Allowed IPs to 0.0.0.0/0.
I want the Pi to work on different networks and work as soon as I connect it without worrying about the network. That's why I can't set a static configuration and have to rely on DHCP.
The problem is that DHCP adds the following routes automatically at startup:
default via 10.2.1.3 dev ens18
10.2.0.0/16 dev ens18 proto kernel scope link src 10.2.150.39
So if I call e.g. 10.2.1.1 my traffic is not routed through WireGuard and I end up on another host. So I would like to disable the automatic generation of these routes so I can set my own. I appreciate any answer :)