Sign in with
Sign up | Sign in
Your question
Solved

Conniecting two computers directly throught the internet

Last response: in Networking
Share
April 7, 2011 11:46:40 AM

Is this possible? I just want to connect two computers over the internet as if they are in the same network. This doesnt have to be VPN I dont care about security I just want to get them connected as if they are on the same network. I dont really want to have to use third party software because I dotn want to go through anyone elses servers but if it is software that lets me directly connect I am ok with that.

Is there anyway to set this up in my linksys router? Can I use windows VPN? What is the easiest way to get this accomplished? Can you somehow connect two routers through internet like one is 192.168.1.1 and one is 192.168.2.1?

Like I said I dont really care how it is done I just need it done. Please let me know the easiest way to connect two computers through internet so that they are on the same network.

Thank you,

Dakota
April 7, 2011 3:26:43 PM

for a real VPN you would need the Public IP addresses and if they are not static you will DDNS setup to track one of them.

easiest way that I found is use Hamachi from Logmein.com

It is a VPN software and is free for personal use.
m
0
l
April 7, 2011 3:48:24 PM

+1 for LogMeIn Hamachi.

Yes, you do use their server, but once connected, that server drops out of the picture. You're always connected DIRECTLY to each other. Heck, I’ve even used it for computers all located behind my firewall! I can drop the Internet connection and it continues to function. All that the Hamachi server does is make it easier to locate and authenticate your VPN partners. And you don’t need to manage firewall ports either.

If you’ve never used Hamachi, you don’t know what you’re missing. It’s easy and works great.

I guess the next best solution would be to establish VPN servers on each network, then cross connect your clients. Of course, each would need to be using different subnets (which it appears is already the case). And you’d need to open/forward the appropriate ports (e.g., 1723 for PPTP). And of course each router would need to support VPN pass-through. And you would need DDNS for location services. And need to make sure your security is setup correctly (anything less than SSL, which Hamachi uses, it’s always suspect in my mind), although you seem less concerned than most ppl, so perhaps PPTP is ok. You’ll also want to decide if Internet requests would remain local or use the VPN (probably the former).

IOW, it can be done, but takes far more work. It’s up to you.


m
0
l
Related resources
April 7, 2011 11:26:39 PM

I actually use Hamachi now I just like the idea of doing it myself better. So say I dont use hamachi...can you help me set it up? I am not for sure what you mean by having different subnets. And where do I set up the connection? Windows VPN?

Also I already have DDNS set up on both computers.
m
0
l
April 8, 2011 12:28:38 AM

A search of Google will reveal plenty of guides on the 'net for setting up both a Windows VPN server and VPN client (it’s all built-in). No point repeating it all here. The simplest is PPTP. I recommend using MSCHAP2 exclusively for maximum security.

The premise of most VPNs is that you’re being given secured access to another network, but that doesn’t mean you want to lose access to your local network in the process. If you didn’t have unique subnets, there would be confusion when referencing local vs. remote resources. This is another example of where Hamachi differs (and perhaps is better). Hamachi essentially “joins” the networks to a third subnet (5.x.x.x), so you don’t have any conflicts.

So each side would establish their VPN server and port forward to that server on their respective routers. And each side would create client connections to those remote VPN servers based on their respective public IPs. On the VPN client, you’ll want to decide if gateway requests should be handled locally or passed to the VPN (configurable on the VPN client). On the VPN server, you’ll want to decide if the VPN clients should have access to local resources or only that machine (configurable on the VPN server).

It’s really not all that difficult. Just try it and stumble along, see how far you get, you’ll learn more. Only gotcha I’ve found is that I usually have to specify a specific IP range on the VPN server. DHCP doesn’t seem to work (I believe it’s a policy issue).
m
0
l
April 8, 2011 3:15:05 AM

Thanks for the help. I do have a couple more questions. I have set up a VPN on my computer as the host and we have successfully connected but every time we connect it will last for a minute or two and then the client computer will lose internet connection completely. Something is conflicting with another. I think it may be what your saying with the subnet as I am still a little confused on what you mean by that. Are you saying one computer needs to be 255.255.255.0 and the other 255.255.0.0? I dont think thats what you mean but im not sure.

Also do we need three computers for this to work? Does there need to be a third computer to actually be the VPN server or can one of the two computers be the server and the other the client?

My local IP address is 192.168.3.100 and his local IP address is 192.168.1.2

We connected together like I said but after we connect windows gets mad at something and he loses his internet completely. I am sure its something simple I am missing but please help me if you can.

Also since you said not to use DHCP what do I set the range to? something like 192.168.3.(150-200) or something like 192.168.4.(100-150)?
m
0
l

Best solution

April 8, 2011 2:58:44 PM

jedinegotiator said:
Thanks for the help. I do have a couple more questions. I have set up a VPN on my computer as the host and we have successfully connected but every time we connect it will last for a minute or two and then the client computer will lose internet connection completely. Something is conflicting with another. I think it may be what your saying with the subnet as I am still a little confused on what you mean by that. Are you saying one computer needs to be 255.255.255.0 and the other 255.255.0.0? I dont think thats what you mean but im not sure.


255.255.255.0 and 255.255.0.0 are subnet masks. When combined w/ an IP address, they determine your subnet.

Let’s say your network is using addresses 192.168.1.1 thru 192.168.1.255. That means the subnet mask is 255.255.255.0, with the trailing .0 indicating only the last node changes.

Let’s say the other network is using addresses 192.168.1.1 thru 192.168.255.255. That means the subnet mask is 255.255.0.0, with the trailing .0.0 indicating the last two nodes change. This subnet has 255 times more usable network addresses than the previous subnet. More importantly, this subnet and the prior subnet *overlap* since this subnet includes the prior subnet, and more.

What you need for the second network is a non-overlapping subnet, such as 192.168.2.1 thru 192.168.2.255 w/ subnet mask 255.255.255.0. Since it uses the same subnet mask as the first subnet, but uses a different third node (1 vs 2), you have no conflicts, no overlap, and no VPN issues.

Also do we need three computers for this to work? Does there need to be a third computer to actually be the VPN server or can one of the two computers be the server and the other the client? said:
Also do we need three computers for this to work? Does there need to be a third computer to actually be the VPN server or can one of the two computers be the server and the other the client?


There’s no need for a third computer (not unless you want to). Each computer can serve both as a VPN client and VPN server to the other. You’re essentially cross-connected. You see his computer/network, he sees your computer/network.

My local IP address is 192.168.3.100 and his local IP address is 192.168.1.2 said:
My local IP address is 192.168.3.100 and his local IP address is 192.168.1.2


Assuming you’re both using the same subnet mask of 255.255.255.0 (highly likely), you have two, non-overlapping subnets, so you’re fine. OTOH, if for some reason either of you was using a subnet mask of 255.255.0.0, then you’d have a problem since you’d have some overlap.

We connected together like I said but after we connect windows gets mad at something and he loses his internet completely. I am sure its something simple I am missing but please help me if you can. said:
We connected together like I said but after we connect windows gets mad at something and he loses his internet completely. I am sure its something simple I am missing but please help me if you can.


In all likelihood you each want to maintain internet access locally, and only want direct access to each other’s “local” resources. Let’s assume that’s the case for now.

Each VPN client can be configured to either use its own gateway for internet access, or send Internet requests across the VPN. By default, Windows assumes the latter. But if the VPN server is configured to either not allow access to anything but that VPN machine, or doesn’t provide a default gateway for its VPN clients, then any VPN client expecting to use the VPN server for Internet access will be denied.

The best thing to do is to confine your Internet access locally. To do that, find the client network connection, right click to Properties, select the Network tab, double click TCP/IP, under TCP/IP properties select Advanced, and make sure “Use default gateway on remote network” is NOT checked. Now all your Internet access will remain local, it won’t use the VPN server.

Also since you said not to use DHCP what do I set the range to? something like 192.168.3.(150-200) or something like 192.168.4.(100-150)? said:
Also since you said not to use DHCP what do I set the range to? something like 192.168.3.(150-200) or something like 192.168.4.(100-150)?


I said DHCP probably won’t work across the VPN (at least it gives me lots of headaches), but if it works for you, great. I think it’s either because the VPN client is not able to push DHCP requests across the VPN connection, or perhaps a policy issue on the VPN server side. I haven’t determined which.

So if you encounter the same problem, you can configure the VPN server w/ a static range of IP addresses. Doesn’t matter what you use as long as it doesn’t conflict w/ your existing devices or the IPs being handed out by the DHCP server on that network.
Share
April 8, 2011 5:07:24 PM

Thanks you very much. I am not at my home right now but I will try you recommendations when I get home. I have a feeling my problem was that I was trying to use the VPN Server's default gateway as the client computers default gateway.

I will let you know how it goes and thanks for the large explanation.
m
0
l
April 9, 2011 4:13:35 AM

Great! Thank you so much its working. I will mark your answer as the best answer eibgrad. One more question before I mark this as solved. We are connected via VPN and I can ping him successfully but when I go into my computer and networks his computer doesn't show up so I cant access his files. He has his settings to allow file sharing but his computer doesnt show on the network.

If you dont know why this is that is fine we are connected is the main thing.
m
0
l
April 9, 2011 5:16:55 AM

I don't believe it's possible.

http://support.microsoft.com/kb/117633

To my knowledge, WFW (Windows for Workgroups) was never designed to work across subnets. Minimally, each subnet would need to be using the same workgroup name. But from there it starts to get complicated. Each subnet should have its own master browser. But as far as I know, there's no provision in WFW for synchronizing those master browser w/ each other. If it's going to work at all, it would probably require each of you using a shared domain controller and having it maintain synchronization.

Remember, you don’t have to connect to resources by name, you can just use explicit IP addressing:

net use * \\192.168.3.100\someshare /persistent:yes

Granted, that does become rather tedious at times. What you could do instead is create unique hostnames, add them to hosts files for your respective networks, and exchange them. The hosts file is always checked first before any DNS server is every queried. Hardly a perfect solution, and doesn’t work well if most devices are using dynamic IP assignments, but it’s better than nothing.

Btw, this issue of browsing and name resolution comes up w/ Hamachi too.
m
0
l
April 9, 2011 8:17:43 PM

Ok thanks for all your help. I am marking this as solved.
m
0
l
April 9, 2011 8:17:53 PM

Best answer selected by jedinegotiator.
m
0
l
!