Question Issue with Accessing Devices Connected to VPN Server on Home Network

danielbananik

Honorable
Dec 23, 2017
6
0
10,510
I have a server set up on my home network running both OpenVPN and WireGuard through PiVPN. While connecting to the VPN using mobile data, I can successfully access all the devices on my home LAN. However, I'm encountering a problem where I cannot access the devices connected to the VPN from within my home LAN. The only workaround I've found is by connecting a device that is already on the home LAN to the VPN, and then using the virtual IP address to access it.

I would like to connect to the VPN using mobile data and have it create an interface on my home router for that device. I have been attempting various solutions for a few hours now, but nothing seems to be working. I'm wondering if achieving this setup is even possible, and if so, I would greatly appreciate any guidance on how to resolve this issue.

What I'm trying to achieve: View: https://imgur.com/a/4scvTfT


If anyone has encountered a similar issue or knows a possible solution (OpenVPN or Wireguard), I would greatly appreciate your input.
It's ZTE Speedport Entry 2i router so I dont have much control.
 
imgur is being bad again today, say over capacity, so can't see your diagram.

What I suspect is happening is very similar to the nat issue with say a device on the internet attempting to access your lan.
All your devices share the same wan IP in that case and if you do not do something like port forwarding you can't get access.

Since it appears you are using some kind so server it means the server only has 1 IP address. You would have to find a way for the vpn server to assign different lan ip addresses to each session. This would mean it would somehow have to either assign IP or ask the DHCP server on your router for multiple addresses.

This tends to be somewhat easier when you run the vpn on the main router since it can then assign different IP addresses directly but I don't think your router can run openvpn or wireguard and even if it could it is not a common option to have it assign different IP to each session.

I used to do it using a dd-wrt implementation years ago. In theory your pi should be able to do it because it is linux based but I suspect you will have to manually key in a pool of ip for it to use.

There is no standard vpn server configuration so it is hard to exactly how to configure it even if it is possible.
 

ajohnson30

Distinguished
Jul 26, 2012
45
8
18,545
It sounds like you want to change your OpenVPN to run in bridged mode instead of routed mode, so it wont supply dhcp or create a separate VPN network, isolating any VPN users from your network. How you do that depends on your version and install, which is going to differ somewhat in each case. I'm not sure it's a good idea, either, but that's on you.

I'd start here:
 

danielbananik

Honorable
Dec 23, 2017
6
0
10,510
Probably thats what I want to do because if I run a VMWare VM with Bridged network adapter it creates second interface in my routers panel. (Host=192.168.1.88,VM=192.168.1.33)
image.png

So now I just gotta configure the OpenVPN server