[OpenVPN Server] How to make clients see other devices in my private network

brennoflavio

Cadet
Joined
May 22, 2022
Messages
5
Hello all, this might be answered already but I did some research and could not find anything around.

I have a Truenas Core with an OpenVPN Server configured and running. Clients are able to connect to the network and get a private IP assigned correctly.

1694644177870.png


Most of my devices are on the 192.168.0.0 subnet. For example, Truenas IP is 192.168.0.4, and a database server that I have has its IP of 192.168.0.32. 192.168.0.1 is my ISP gateway.

With the setup above, my clients are able to see Truenas server (for example its possible to open the UI at http://192.168.0.4), but they cannot see other devices in that subnet (they can't connect to the database for example, hosted at 192.168.0.32).

How can I tweak my setup to make it see other devices in the network? My ultimate goal is to expose my home network to VPN clients, without routing all traffic trough it.

I do not have any tunables / static routes / init scripts configured with this setup yet.

Thanks for the help!
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
You either have to use bridging (TAP interface) or create a static route on your router for the VPN network (192.168.2.0/24).
On your router, you will need to add a static route for 192.168.2.0, subnet 255.255.255.0, gateway 192.168.0.4
You may also need to add IP forwarding: System -> Tunables -> Add
Variable: gateway_enable
Value: YES
Type: rc.conf

Bridging is probably easiest as the VPN clients will be in the same broadcast domain and can send a DHCP request to your router and get all this connectivity for free, but it's also less robust.
 
Last edited:
Top