Page 1 of 1

VPN - Will my setup work? Same subnet on both ends

Posted: Sun May 20, 2018 3:32 pm
by robertEIT
Hi,
I'm going to add a RB951G on my LAN at work and create a VPN using the pptp protocol.

What I want is to be able to access my LAN at work with my laptop when I'm roaming and use the local HP network printer wich has a fixed IP (192.168.0.254), access some SMB shares using the IP (//192.168.0.200/Data) etc.

My work subnet is 192.168.0.1/24. DHCP pool is 192.168.0.10 - 192.168.0.199

I'm going to setup my PPTP VPN using this tutorial https://wiki.mikrotik.com/wiki/Manual:Interface/PPTP and give my laptops an IP in the same subnet using addresses left out by DHCP (ex. 192.168.0.201). I use this setup for my home VPN and it works fine.

My question is what happens when for example I'm with my laptop in a place where the local subnet for internet access is also 192.168.0.1/24 wich is common? If I connect to my VPN will I be able to access the resources in my remote LAN or will there be routing issues?

Re: VPN - Will my setup work? Same subnet on both ends

Posted: Sun May 20, 2018 4:21 pm
by ingdaka
Sure it will work! Just you need to set your VPN interface as default gateway so all traffic will go through VPN!

Re: VPN - Will my setup work? Same subnet on both ends

Posted: Sun May 20, 2018 4:49 pm
by robertEIT
Sure it will work! Just you need to set your VPN interface as default gateway so all traffic will go through VPN!
My laptops will run Windows 10 and MacBook Pro connecting to VPN over WiFi. I'll try it for a few days. Does connecting to a VPN automatically selects that connection as default gateway in Windows 10 and MacOS or do I have to manually set that up?

Re: VPN - Will my setup work? Same subnet on both ends

Posted: Sun May 20, 2018 5:43 pm
by CZFan
No it will not work in that scenario

Re: VPN - Will my setup work? Same subnet on both ends

Posted: Sun May 20, 2018 9:23 pm
by robertEIT
No it will not work in that scenario
Ok, so what options do I have? I can't really change the work subnet from 192.168.0.1/24 and I do need a way to access the printer and shares.

Sent from my STH100-2 using Tapatalk


Re: VPN - Will my setup work? Same subnet on both ends

Posted: Sun May 20, 2018 9:57 pm
by sindy
No it will not work in that scenario
Ok, so what options do I have? I can't really change the work subnet from 192.168.0.1/24 and I do need a way to access the printer and shares.

Sent from my STH100-2 using Tapatalk
You can use a pool in a different subnet for the pptp clients, and use dst-nat rules to provide aliases for the devices in the company LAN, and src-nat rules to make these devices respond to the RB's address if the RB is not their default gateway.

I'd be more afraid of problems associated to establishing a PPTP tunnel through a NAT, which must be there as you say the client PC gets an IP from 192.168.0.0/24.

Re: VPN - Will my setup work? Same subnet on both ends

Posted: Wed May 23, 2018 9:45 pm
by ingdaka
On MAC it will work just check: Open Network Configurations > Click VPN interface Created > Advanced > Check Send All Traffic Over VPN Connection. I use more than 10 VPN like that for my remote clients and it works perfect!