OPNsense Forum

English Forums => Virtual private networks => Topic started by: cobrax2 on July 12, 2024, 10:47:50 AM

Title: Problem accessing lan from some networks
Post by: cobrax2 on July 12, 2024, 10:47:50 AM
Hi
I use openvpn to connect from my android device to home network. Internet is working great, no issues.  But when i go to some other zones in the country, or to another country, i can connect fine to the server, internet is working, but lan is not accessible for some reason. Doesnt matter if i use gsm or another wifi, it just doesnt work. I come in the relative area of my home, and using the same device, same gsm, it doesnt see it. What could be the problem? Thanks!
Title: Re: Problem accessing lan from some networks
Post by: Patrick M. Hausen on July 12, 2024, 10:53:57 AM
The mobile network you are using could have an address conflict with your LAN.

Check the mobile or WiFi IP address your device uses.
Title: Re: Problem accessing lan from some networks
Post by: cobrax2 on July 12, 2024, 12:12:05 PM
You mean that the gsm or wifi that i connect to have the same 192.168.10.0 network as mine? And then, when i connect to vpn it gets to 192.168.50.0 (assigned by the vpn) and then the route to my home 192.168.10.0 gets confused to the local gsm?
If so, what can i do?
Thanks
Title: Re: Problem accessing lan from some networks
Post by: Patrick M. Hausen on July 12, 2024, 12:26:02 PM
Quote from: cobrax2 on July 12, 2024, 12:12:05 PM
You mean that the gsm or wifi that i connect to have the same 192.168.10.0 network as mine? And then, when i connect to vpn it gets to 192.168.50.0 (assigned by the vpn) and then the route to my home 192.168.10.0 gets confused to the local gsm?

Yes, that's what I mean.

Quote from: cobrax2 on July 12, 2024, 12:12:05 PM
If so, what can i do?

First check if that is really the cause of the problem. If it is, nothing much but pick a less common address range for your home network. I would be surprised to find RFC1918 addresses in a GSM network, honestly - should be CGNAT (100.64...) instead. But in hotel or airport WiFi - perfectly common to have 192.168.x.0/24.
Title: Re: Problem accessing lan from some networks
Post by: cobrax2 on July 12, 2024, 12:34:03 PM
yes, when on gsm, i usually am on 10.0.0.0
so what else could be the issue if the private address is not the problem?
Title: Re: Problem accessing lan from some networks
Post by: Patrick M. Hausen on July 12, 2024, 12:47:48 PM
I don't use Android, so I have no idea how close to the system you can get. I'd check IP addresses and routes first, i.e. what gets routed through the VPN when the tunnel is active.

Have you ever tried the same OpenVPN connection from a laptop?
Title: Re: Problem accessing lan from some networks
Post by: cobrax2 on July 12, 2024, 01:22:21 PM
Yes, tried with windows and it did the same
Title: Re: Problem accessing lan from some networks
Post by: Patrick M. Hausen on July 12, 2024, 01:23:54 PM
Then get the output of "ipconfig /all" and "route print ..." (don't know if that takes any extra parameters) next time that happens, and report back.  :)
Title: Re: Problem accessing lan from some networks
Post by: cobrax2 on July 12, 2024, 02:34:50 PM
Ok, thank you.
For now, i've changed my lan to 10.9.99.0. Maybe it will work better