When to use local/VPN IP addresses when being connected to PiVPN (WireGuard)

Hi there,

I’m really at the beginning of my home networking journey, so please forgive if this question might be a little bit on the obvious side.

Here’s the scenario: I successfully managed to run PiVPN, Pi-hole, Samba as well as Syncthing on a Raspberry Pi 4. My main goal for doing so was to be able to access my home network in a safe-manner remotely by logging into the VPN.

However, when configuring those other services I realized that I’m a sometimes confused whether I should use the local IP address or the IP address given by PiVPN when being connected. Is there actually any difference when it comes to security? Here are a few examples:

- ssh into Pi (ssh [email protected] vs ssh [email protected])
- Pi-hole IPv4 address (192.168.0.X vs 10.X.X.X)
- Connect to Samba server (\\192.168.0.X\shared vs \\10.X.X.X\shared)
- Syncthing GUI Listen Address (192.168.0.X vs 10.X.X.X)

Then there’s the actual PiVPN configuration file itself ‘setupVars.conf’ where you have to specfiy the ‘IPv4gw’ as well as the ‘pivpnDNS1’ (to point to Pi-hole) which could either be 192.168.0.X or 10.X.X.X… as you see it’s giving me a lot of headache as I haven’t fully understand when to actually use the local and when to use VPN IP address.

Any information on this would be greatly appreciated, thanks!

I always just use my local ip address when accessing my stuff when im away from my home network.

It does not matter which you use.

I stick with the LAN IP for simplicity.