-2

Updates: let's assume the locations are separated, so WAN transversal is a must, and no physical networking is possible.


I want to be able to connect two machine's networks together using a software approach, as opposed to a network router VPN approach. What I don't need is for the rest of each network to be able to see the other one. What I do need is for client A to be able to see client B's network, and vice versa.

I find images help. I have some diagrams to try and explain further. Let's say we have two networks. In each network we have three servers, a router, and a client machine.

Fig A

Now, I don't need any of the left servers to be able to communicate with any of the right servers. I simply need client 1 to be able to access the right servers via IP, like so:

Fig B

Likewise, I need client 2 to be able to access the left servers via IP, like so:

Fig C

Now, considering that they could possibly have the same subnet, is there a way that you can get around this? Such as giving the VPN tunnel an IP like 172.X.X.X, and then translating that? 172.0.0.1 -> 192.168.1.1 on the other end?

On the other hand, if the IP subnets didn't have a clash, such as the right hand network using 192.168.2.X, would it be possible to link up the two clients and be able to access IPs as they are? i.e. client 1 (192.168.1.100) connecting to server F (192.168.2.4)?

Fig D

If either of these situations are possible, how would you implement them? I'm thinking of X-platform, so windows, linux, osx. Something like an open protocol with numerous clients would be best I'd bet.

I hope this comes across as a legible question. I'm a developer, so I'm sure there are many holes in my networking knowledge where really, really obvious stuff isn't occuring to me. Please call me out on anything I'm missing, and if you have anything to add, please do! I appreciate all feedback!

Thanks a bunch for reading!

11
  • 2
    Well, the most obvious is routing if they're in the same location (so, no WAN traversal). Since they're the same internal IP addresses, that'd make things difficult to do.
    – Nathan C
    Oct 15, 2014 at 12:54
  • Let's assume they are not in the same location, and there is no physical changes available. Also, as per my second question, assume if they had different internal IPs, how about that? Oct 15, 2014 at 12:56
  • 5
    Use a VPN. There's really no way around it if you're going over WAN.
    – Nathan C
    Oct 15, 2014 at 13:04
  • 1
    Nope, I haven't had homework in ten years. I wonder if I should take that as a complement for how well I laid out the question. Oct 15, 2014 at 13:13
  • 2
    It's just more of a case that it doesn't sound like it was written by a sysadmin, but it was well written, just not what we expect is all. You will get answers though - but most people here will just be thinking 'he needs it routed properly - oh and sort out the addressing' :) I'm an ex-Manc btw, hiya!
    – Chopper3
    Oct 15, 2014 at 13:28

1 Answer 1

1

Any number of VPN products would do pretty much exactly what you want. (OpenVPN would be what I'd use, personally.)

One side would run as the VPN server and the other as the client. You'll need the the appropriate port open on the firewall on the server side to receive incoming connections.

If that's a non-starter you could always introduce a third machine into the mix, hosted somewhere out on the Internet, to act as a "hub" for the traffic. Then you could just run VPN clients on both of the "client" machines with the Internet-hosted server acting as the VPN server. Whether this is viable or not depends on your latency needs and bandwidth / hosting costs.

Getting direct "client to client" communication without forwarding a port through the firewall and without an Internet-side server to coordinate the communication is really difficult.

1
  • Thanks, this is the type of answer I was looking for. I thought that a solution like this might exist but wasn't entirely sure. The client-hub-client sounds like a feasible plan, and if you recommend OpenVPN, I'll give that a shot. Thanks Evan! Oct 17, 2014 at 10:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .