Sign in to follow this  
Sir Sapo

Making a Connection Through A Router

Recommended Posts

Hey everyone, I have a networked game that I've been working one for a little while now, playing it over a LAN at my school, but now I would like to test it over the internet, which brings me to my question. Is it possible to make a connection to a computer over the internet, and through a router, if the computer's public IP is known, and a port is agreed on before hand? I'm not that familiar with how a router functions, or what effect a firewall would have on this, but I was just wondering if it would be possible to make a connection given I know the public IP of the other computer, but without any code changes, or an intermediate "Master Server". Sorry if this question has been asked a thousand times before (and I'm sure it has), but I read the FAQ and didn't quite understand if this was possible. Thanks in advance.

Share this post


Link to post
Share on other sites
Yeah, I just want to be able to test it out with my friend outside of a LAN, so its not like I need any matchmaking functionality or anything. Thanks for the reply, I'll check my router's manual and see if it supports packet forwarding.

BTW, if I'm behind a router and he's behind a router, do both of them need to forward the packets?

Share this post


Link to post
Share on other sites
The term to look for is "port forwarding."

If your game is host-based -- i e, one of you "host" and the other "connect," then only the "host" needs to have port forwarding set up.

Another option that some firewalls have is "DMZ" -- it's kind of like port forwarding, for all possible ports :-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this