I built a Wireguard client on my Raspberry Pi based on this tutorial: https://blog.stigok.com/2019/03/26/raspberry-pi-wifi-ap-wireguard-port-53.html
My interfaces are:
eth0 (192.168.1.40/24) <-> router (192.168.1.1/24) <-> internet wg0 (10.1.1.100/24) wlan0 (192.168.254.1/24 dnsmasq + hostapd) <-> mobile clients connected (192.168.254.x/24)
The way i have it
AllowedIPs = 0.0.0.0/0 makes all my traffic go through Wireguard wg0 Interface
AllowedIPs = 192.168.254.0/24 I have to
sudo ip addr flush dev wlan0 before it brings wg0 and I can't access the internet directly using eth0 Interface.
How to fix my routes?