Hello everybody, I have two openwrt routers in two different apartments, communicating via a wireguard VPN. What I would like to have is some clients in the first apartment (let's call it AP1) to be routed via the wireguard channel and use the public IP address of the second apartment (AP2); in addition some clients of the second apartment should be routed via the same channel and use the public IP address of the first apartment.
I'm failing to do this and the only solution I've found is to establish two mirror wireguard VPNs (in which AP1 is server for the first one and client for the second one, and the opposite for AP2) and the PBR package takes care of the rest. Having two VPNs sounds redundant to me, and this should be possible with just one VPN.
My setup is the following:
AP1 AP2
WGserver wg0 192.168.123.1 <- WGclient wg1 192.168.123.2
WGclient wg1 192.168.126.2 -> WGserver wg0 192.168.126.1
AP1
config interface 'wg0'
option proto 'wireguard'
option private_key 'CENSORED'
option listen_port 'CENSORED'
list addresses '192.168.123.1/24'
config wireguard_wg0 'wg_client'
option public_key 'CENSORED'
list allowed_ips '192.168.123.2/32'
config interface 'wg1'
option proto 'wireguard'
option private_key 'CENSORED'
list addresses '192.168.126.2/32'
config wireguard_wg1 'wgserver'
option public_key 'CENSORED'
option endpoint_host 'CENSORED'
option endpoint_port 'CENSORED'
option persistent_keepalive '25'
list allowed_ips '0.0.0.0/0'
list allowed_ips '::/0'
config zone
option name 'lan'
list network 'lan'
list network 'wg0'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
config zone
option name 'wan'
list network 'wan'
list network 'wan6'
list network 'wg1'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
The configuration for AP2 is the same.
Is there any way to achieve what I want with just one wireguard connection (let's say AP1 192.168.123.x)?
Thanks in advance