Community discussions

MikroTik App
 
vadoola
just joined
Topic Author
Posts: 1
Joined: Wed Apr 12, 2023 2:02 am

Trying to connect to Separate VLANs with overlapping subnets from VPN

Wed Apr 12, 2023 2:34 am

I have an unusual situation and I'm struggling to make it work. I'm currently testing with a hAP ac2, but I'm not limited to that specific model.

I currently have two distinct isolated LANs they are not connected in any way, to each other, to any other network or the internet. They are both using the same subnet 192.168.1.0/24, and there are devices with the same IPs on both networks. As it is I cannot change the IPs for either of these two networks.

I'm trying to get access to these two networks over a VPN connection. I can connect both of these networks to the Mikrotik using separate vlans, and it works, I'm not getting any cross talk, or conflicting IPs. If I plug my laptop into a VLAN 1 port, I get the devices on Network 1, and if I plug my laptop into a VLAN2 port I get the devices on Network 2. However I'm not having any luck getting access to either network from a third vlan, or a vpn connection.

Both of these networks have only 30 devices or so. I was thinking I could setup 1 to 1 NATs, something along the lines of 192.168.10.1-30 map to 192.168.1.X on VLAN 1, and 192.168.50-80 to 192.168.1.X on VLAN 2. Or even use different subnets such as 192.168.10.X maps to 192.168.1.X on VLAN 1 and 192.168.20.X maps to 192.168.1.X on VLAN 2.

However I have been unable to get this working. From my thinking this is a destination nat as traffic is being initiated from the VPN side to the local LANs. But for destination nat, I can't specify an interface or VLAN or VLAN bridge, etc, for it to exit. I can only specify a To Address, and the router won't know what VLAN to send it to because it only knows to send it to 192.168.1.X.
Any thoughts on how I could go about resolving this? Or even different methods if I'm going down the wrong rabbit hole?

Who is online

Users browsing this forum: Dish, Dulcow, Huy0880, stergios, Valerio5000, Weareyoung0416 and 67 guests