|
-
Aug 24th, 2007, 12:31 PM
#1
Thread Starter
Addicted Member
Connecting computers using Winsock behind a router
Hi,
I've managed to connect two computers using Winsock for p2p chat. But what do I need to do to connect two computers from different networks (through the internet)?
So the first computer is behind a router, and so is the second one.
Has anyone got this problem before?
//Alex
-
Aug 24th, 2007, 12:52 PM
#2
Fanatic Member
Re: Connecting computers using Winsock behind a router
are you getting no connection for the two computers? if so it's because of the router firewall, you have to enable the port on the firewall..
-
Aug 24th, 2007, 01:21 PM
#3
Re: Connecting computers using Winsock behind a router
I think this gets asked a few times a week.
1. If you have a firewall, open the ports.
2. If you have a router, open the port for your computer through the port forwarding settings.
-
Aug 24th, 2007, 02:28 PM
#4
Member
Re: Connecting computers using Winsock behind a router
I have the same problem as cyber_alex, and I've tried everything, it still doesn't work. The application still shows my local IP, and my computer is still unconnectable through my external IP. The only way to make it work is to disconnect the entire router, and directly connect my computer to the modem.
I therefore think that you can't solve this problem by just opening some ports, since your router still allots you a local IP even if you open every damn port; you're still a part of the network.
There must be another way - take a serious computer game for instance, something like... Counter-strike (JUST AN EXAMPLE). You never have to make things difficult there, absolutely not more than just shut off the windows firewall... (I don't have any other firewall software) It always works. The same with all the proffesional games you can buy in the store.
So, how do those proffesional games do? Why can't I use the same technique?
//¤dark
Dinmamma.Fat = True
-
Aug 24th, 2007, 02:36 PM
#5
Re: Connecting computers using Winsock behind a router
 Originally Posted by henzino2
I have the same problem as cyber_alex, and I've tried everything, it still doesn't work. The application still shows my local IP, and my computer is still unconnectable through my external IP. The only way to make it work is to disconnect the entire router, and directly connect my computer to the modem.
I therefore think that you can't solve this problem by just opening some ports, since your router still allots you a local IP even if you open every damn port; you're still a part of the network.
There must be another way - take a serious computer game for instance, something like... Counter-strike (JUST AN EXAMPLE). You never have to make things difficult there, absolutely not more than just shut off the windows firewall... (I don't have any other firewall software) It always works. The same with all the proffesional games you can buy in the store.
So, how do those proffesional games do? Why can't I use the same technique?
If you have to disconnect from the router and go straight to the modem then you haven't setup your router settings correctly. Or there is something else standing in the way.
When setting up port forwarding settings, you enter your computer's LAN IP address, the port numbers, select TCP/UDP, and click enable.
If all else fails, you can enable DMZ hosting for your IP address which will essentially open all ports.
This applies to all software, games too. Games may have uPnP built in that can configure the router automatically, but the same rules still apply. There is no "Special technique" they are using.
-
Aug 24th, 2007, 03:25 PM
#6
Member
-
Aug 24th, 2007, 05:30 PM
#7
Re: Connecting computers using Winsock behind a router
henzino2, unless you are an expert programmer, coding upnp isn't just something anyone can do. Also, most games that are well known have an advantage over other games. Router/firewall manufacturers already configure these ports to be opened before that router is sold to you. For example, the battlenet servers are pre-configured on my router. So is AIM & MSN. Futhermore, when you use those games, you are connecting to a server that is in between you and the other players. In your p2p chat program, your routers are the ones in between you and your friend.
[vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you. 
-
Aug 24th, 2007, 06:11 PM
#8
Re: Connecting computers using Winsock behind a router
 Originally Posted by henzino2
Echoing what driven said. I wouldn't bother with uPnP in your program. For one, I'm not sure how to do it, and it's not reliable. There are still a lot of routers that don't support uPnP and that implement things in different ways.
Just understand that, while DMZ makes things easier, it's insecure. You are no longer protected by your router. If DMZ worked, then chances are, port forwarding works too you just had it setup incorrectly.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|