What's new

Trouble accessing remote web admin through VPN

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

jtp10181

Senior Member
What I am trying to do is log into the OpenVPN server setup on a remote router from my home network and access the router WebUI. Both the remote LAN and my home LAN use 192.168.1.1 for the gateway. If I am on my home network 192.168.1.1 is always going to my home gateway/router, I have tried a bunch of different tricks I found online and nothing is working. Now if I get off my home network by using my phone as a hotspot, then 192.168.1.1 is connecting me to the remote router, so I know the VPN server is allowing me to access it at least.

I assume if I put the remote router on a different subnet it would work fine, but I would like to avoid that.

Is there a way to make the OpenVPN connection more like a tunnel? The VPN I use for work blocks all local LAN traffic when connected, cant print to my printer or anything, if I could get OpenVPN to work like that then this would work I think.

Anyone have any tips I could try? All I really want to do is connect to the VPN and then access the web interface of the remote router, and SSH.

Remote router is AC68U running newest merlin firmware. No USB drive, no addon scripts.
 
Either set the server to provide both Internet and LAN access (which means to use the remote endpoint as your default gateway), or have the server push a route to its subnet, something like this:

Code:
push "route 192.168.1.0 255.255.255.0"

I cannot confirm that either will work, since in your case it's the gateway itself you are trying to access, not just a LAN client.
 
Ok you confirmed I was heading in the right direction. Fresh start today and I got it sorted out. The route you suggested gets created already automatically but the metric is higher than the existing router so I had to be more specific. Going to document it here in case anyone else needs to do this.

VPN Server is setup as "LAN Only" but it also worked with "Both", but I dont want to to use its internet connection so I switched it to LAN only and tested it that way as well. All other VPN settings in Advanced are defaults.

During this I was using a command prompt in windows to check the routes being setup using route print
The goal is to get a low metric route for 192.168.1.0 or 192.168.1.1 going to the remote VPN gateway

If you want to force this to ALL clients, you can set it on the server under Advanced > Custom config. I found that it does not want to override the default route for 192.168.1.0 255.255.255.0 even if I try to set a lower metric (first line). So the only thing I could get to work from the server side was to set a route for only the gateway as below (second line). vpn_gateway is a special keyword that gets replaced by the VPN gateway address.
push "route 192.168.1.0 255.255.255.0 vpn_gateway 1" push "route 192.168.1.1 255.255.255.255 vpn_gateway 1"

If you want to set it only on a specific client just edit the opvn file (if after importing you have to find it in AppData). In here it seems that it will allow you to override the default route and lower the metric. The commands are the same just without the push "". You can use either of these depending on if you want to make the entire remote network a lower metric or just the remote gateway.
route 192.168.1.0 255.255.255.0 vpn_gateway 1 route 192.168.1.1 255.255.255.255 vpn_gateway 1

Both of these setups seems to allow full access to the remote LAN, only catch is how your metrics are, if your local network has a lower metric it will go there first if clients on both networks have the same IP. So if you want to easily access the entire remote LAN I suggest setting the first line above on the client side opvn file to change the metric on the default route.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top