Access LAN's private network from WireGuard's private network

Started by phaze75, March 10, 2025, 04:42:09 PM

Previous topic - Next topic
Dear all,

Coming from a years-old OpenVPN setup, I just have configured WireGuard. I followed the "WireGuard Road Warrior Setup" installation guide and successfully completed the setup. I have one instance and two peers connecting flawlessly from LAN and WAN, including the firewall rule for peers to access the Internet.

However, there is still one task open. My WireGuard service uses the private network 192.168.1.0/24 and my LAN uses the private network 192.168.0.0/24. While the WireGuard peers can access the Internet, they cannot access any of my LAN services. I tried several firewall rules with the LAN and WireGuard interfaces, but no success so far. I had a similar setup with OpenVPN working, using two separate private networks.

I know the solution must be rather trivial, but I simply don't get to it. Could you please help me out?

Quote from: phaze75 on March 10, 2025, 04:42:09 PMWhile the WireGuard peers can access the Internet, they cannot access any of my LAN services
Maybe they are guarded by their hosts-firewalls?

Quote from: Bob.Dig on March 10, 2025, 06:21:02 PMMaybe they are guarded by their hosts-firewalls?

Thanks for the suggestion, but no. The firewall rules are not the issue.

ChatGPT pointed me to the solution:

Adjust WireGuard Peer Configurations

On each WireGuard client (peer), check the AllowedIPs setting:
Change AllowedIPs = 0.0.0.0/0 (or similar) to include the LAN network:

     AllowedIPs = 192.168.0.0/24, 0.0.0.0/0

This ensures that traffic destined for 192.168.0.0/24 is sent through the VPN tunnel.
Restart the WireGuard client after making the changes.

Adding 192.168.0.0/24 to AllowedIPs did the trick.