Here's my situation.
At home, I am using an OpenWrt device on 192.168.1.1. All other devices on this network are on the 192.168.1.0/24 subnet.
I created a Wireguard VPN on the same device, using address 192.168.9.1.
I am able to connect properly to the VPN on another network also using the 192.168.1.0 subnet, but there's a difference:
- On my phone, 192.168.1.0/24 addresses are routed to the home network via the VPN. This is the desired behaviour.
- On my laptop, running Ubuntu, 192.168.1.0/24 addresses are routed to the laptop's network. This is not what I want.
How can I force my laptop to use the Wireguard VPN for 192.168.1.0/24 addresses?
/etc/config/network snippet:
config interface 'VPN'
option proto 'wireguard'
option private_key 'wKu+6C4x6wbm/QpY34ZNJkJ5vxaQTQqKiX19NbRk3Vo='
option listen_port '51820'
list addresses '192.168.9.1/24'
config wireguard_VPN
option description 'phone'
option public_key 'redacted'
option private_key 'redacted'
option preshared_key 'redacted'
list allowed_ips '192.168.9.2/32'
option route_allowed_ips '1'
config wireguard_VPN
option description 'laptop'
option public_key 'redacted'
option private_key 'redacted'
option preshared_key 'redacted'
option route_allowed_ips '1'
list allowed_ips '192.168.9.3/32'