Skip to main content
GameDev.net gamedev.net
🔒 Locked

Internet Gateway

Started by jonbell Dec 11, 2006 at 9:56 AM 2 replies 1.3k views
Original Post
jonbell
jonbell
My home network uses a router as its gateway to the internet. Therefore none of the hosts on my home network are visible to the outside world. This makes it so that if i create a socket on a local host it is impossible for it to be accessed by an external host because all i have is a local IP address. I have noticed that if I select Internet Gateway from the network connections (in the start menu) and click 'settings' that I can input the details of the sockets I want to be visible to the internet. My question is how do I detect that a host is using an internet gateway and what code do I need to write to get my games socket details onto the list of sockets that is accessible from the internet? Cheers
hplus0603
hplus0603
The only place you can make ports visible to the internet is on the gateway/firewall. You can enable DMZ or port forwarding on the firewall. See the Forum FAQ for more information.
enum Bool { True, False, FileNotFound };
Ozymandias42
Ozymandias42
Generally, the answer is that you cannot write such code. There are a bajillion different routers and they all have different interfaces. Most of them are potentially password-protected, too. There's no standard interface for opening yourself up as a server that you can tap. That's why many games explain in the manual which ports should be opened if you're going to act as a server.
Bob Janova
Bob Janova
You can't (imagine the security holes that would open up!). You need to say in your documentation which ports are needed, and let the user open them. Or buy a server somewhere and let players of your game connect to that instead of hosting games themselves (obligatory pimpage of my lobby server as that sort of thing may be the way to go depending on your game).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.