Community discussions

MikroTik App
 
robertEIT
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Tue Sep 08, 2015 6:16 pm

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

Sun May 20, 2018 3:32 pm

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?
 
User avatar
ingdaka
Member
Member
Posts: 349
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

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

Sun May 20, 2018 4:21 pm

Sure it will work! Just you need to set your VPN interface as default gateway so all traffic will go through VPN!
Ilir Daka
Electronic & Network Engineer
E-mail: ilirdaka@live.com
Mob: +355692982151
WhatsApp: +355692982151
Mikrotik Official Consultant
CCNA | Fortinet NSE3 | MTCRE | MTCSE | MTCWE | RIPE NCC Certified Professional
 
robertEIT
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Tue Sep 08, 2015 6:16 pm

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

Sun May 20, 2018 4:49 pm

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?
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 1693
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Randburg
Contact:

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

Sun May 20, 2018 5:43 pm

No it will not work in that scenario
MTCNA, MTCTCE, MTCRE & MTCINE
 
robertEIT
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Tue Sep 08, 2015 6:16 pm

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

Sun May 20, 2018 9:23 pm

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

 
sindy
Forum Guru
Forum Guru
Posts: 5332
Joined: Mon Dec 04, 2017 9:19 pm

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

Sun May 20, 2018 9:57 pm

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.
Instead of writing novels, post /export hide-sensitive. Use find&replace in your favourite text editor to systematically replace all occurrences of each public IP address potentially identifying you by a distinctive pattern such as my.public.ip.1.
 
User avatar
ingdaka
Member
Member
Posts: 349
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

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

Wed May 23, 2018 9:45 pm

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!
Ilir Daka
Electronic & Network Engineer
E-mail: ilirdaka@live.com
Mob: +355692982151
WhatsApp: +355692982151
Mikrotik Official Consultant
CCNA | Fortinet NSE3 | MTCRE | MTCSE | MTCWE | RIPE NCC Certified Professional

Who is online

Users browsing this forum: cedie, maungmaungmyatsan and 80 guests