My question is related to basics in network routing and iptables, and is probably due to my lack of understanding on how I should set this up.
I have established an overlay network between hosts using wireguard, where one is behind a Router/NAT. In so far the overlay network works well, and each host can talk to the others.
Now, I would like to make Host A a gateway to the private network, but I am miserably failing to do so.
Can you maybe help me unravel the mystery that is iptables forwarding?
3 Networks
The overlay network of the VPN is 169.254.0.0/24
and the private network behind the router is a 192.168.0.0/24
.
- The internet 🐈
- The overlay network (
169.254.0.0/24
, running on Wireguard) - The private network (
192.168.0.0/24
)
4 Hosts
VPN Server
wg0: 169.254.0.1
Client
wg0: 169.254.0.2
Host A
wg0: 169.254.0.3
eth0: 192.168.0.33
Host B
eth0: 192.168.0.53
In order to illustrate the real network, here is this picture:
And here is the overlay network:
At which, my Client is failing to send packets to Host B via Host A.