VPN - Same Subnet?

p11

n00b
Joined
Sep 30, 2012
Messages
63
Hey fellas, I've been trying to get two locations to operate on the same subnet to provide a seamless transition from site-to-site (accessing NAS, local devices, etc.). What is the best method to do this? If this is not possible do I have to manually connect to the different subnet every time I reconnect a service?
 
Last edited:
You can use openvpn or vtun to create a virtual ethernet network between two linux boxes. You can then connect this to real ethernet networks using the bridging functionality in the linux kernel (or presumablly the bridging functionality in windows). By doing so you can build a virtual ethernet network that spans multiple sites.

One tricky thing is what to do about gateways. If one site has a very fast internet connection it may be acceptable to just have one gateway to the internet (so all traffic from the other site has to go over the vpn to access the gateway). If you know which machines will be on each side then you can manually point them at different default gateways either through local static configuration or through rules on the dhcp server.

There are also some tricks where you can make a machine act like a bridge for some traffic but a router for other traffic (google brouter) but i've never investigated this myself.
 
What could work for you is using NAT at both locations. So even though their real IPs are both
192.168.1.0/24 you can perform a NAT so that 192.168.2.0/24 is sent to the other site and the other site will NAT that to 192.168.1.0/24.

It's a bit of work but it could work for you.
192.168.1.10 sends to 192.168.2.10 -> Router -> VPN -> Router (NAT) -> packet gets NAT and arrives to 192.168.1.10
 
Last edited:
wait what? I don't see a reason to not have a subnet at each site, unless you have some very unique situation.
 
wait what? I don't see a reason to not have a subnet at each site, unless you have some very unique situation.

The idea is that a user at their primary location has mapped network drives and would like those same drives accessible at a remote location without any IP address reconfiguration.
 
I think it would be easier to have subnets at each location rather than this bridging stuff, then, just remap the drives.
 
The idea is that a user at their primary location has mapped network drives and would like those same drives accessible at a remote location without any IP address reconfiguration.

dns???
 
If there's a VPN in place then mappings will stay, i don't understand the problem?

If you are on a 192.168.1.0/24 network and have a mapped drive to \\192.168.1.10\share\ then you take your laptop to a 192.168.2.0/24 network why cant you still access \\192.168.1.10\share\ if there is a site to site VPN in place?
 
If there's a VPN in place then mappings will stay, i don't understand the problem?

If you are on a 192.168.1.0/24 network and have a mapped drive to \\192.168.1.10\share\ then you take your laptop to a 192.168.2.0/24 network why cant you still access \\192.168.1.10\share\ if there is a site to site VPN in place?

The issue I'm having in particular is maintaining a connection to a remote computer in order to stream videos via iTunes to an Apple TV. Since the computers are on different subnets the Apple TV cannot find the computer.
 
The idea is that a user at their primary location has mapped network drives and would like those same drives accessible at a remote location without any IP address reconfiguration.

If coming in via vpn they can access via ip, put it in host file.

server1 10.10.1.230

etc. You can also force dns as well, at least with ovpn.
 
Back
Top