OPNsense Forum

English Forums => Virtual private networks => Topic started by: SiggiSchwarz on March 01, 2024, 09:36:33 PM

Title: mobile device with the same ip as home via OpenVPN
Post by: SiggiSchwarz on March 01, 2024, 09:36:33 PM
Hi all,

I set up OpenVPN according to the offical docs (https://docs.opnsense.org/manual/how-tos/sslvpn_instance_roadwarrior.html). I have no problem getting into my home network via my android phone. However, my goal is "to get out again" to have access the internet with my android phone and my home ip.
It doesn't seem to be a common use case as I didn't find any tutorial on this topic. I played around with NAT outbound rules without success. As I lack deeper understanding, I don't even know where to start.
Any hint would be greatly appreciated.

Thanks
Siggi
Title: Re: mobile device with the same ip as home via OpenVPN
Post by: trixter on March 20, 2024, 11:40:56 AM
I think there is a misunderstanding:

If you use a VPN to go from outside into your Netzwork at home, you will usualy get an IP-address of a VPN-Subnet, that ist different from your all-day Lan/Wlan Subnet.

Example :

outside address (94.94.34.21) OPNSense inside-LAN (192.168.1.0/24) - Laptop (192.168.1.11)
                                                             inside-VPN (192.168.100.0/24) - Phone-OPNVPNClient
                                                                                                              (192.168.100.33)

So the VPN leads your Phone into a seperate LAN-Segment, with own rule-set of what is allowed to access.
You would have to allow the vpn-subnet to access your Lan to reach the shares on your Laptop.