Port Forwarding and UPNP
by Howard Dortch · in Torque 3D Professional · 05/28/2010 (3:45 am) · 3 replies
I have a game that is in a release test. The "customers" get the game and run a server so others can join their game. Problem is these test customers dont have the ability to do port forwarding easily. I have looked into UPNP to add to my code to allow the users to do the port forwarding automagicly. I dont see anything on this forum about UPNP or any easy methods to allow my customer base to do it without having to access the router. Can someone shed some light on this issue and show me a painless solution for my customers?
#2
MiniUPnP looks like a very good option. It's supposed to be lightweight and is used in quite a few projects, like the Transmission bittorrent client.
It's also worth look into the Windows Firewall API. It's best used during the game installation, since applications need administrator permissions to change firewall settings. Just write a small console/windowless application that sets up the firewall for you and have the installer run it during the installation.
Also, for maximum effectiveness you'll need a NAT punchthrough server of some sort, since some people like our friend above don't have UPnP enabled.
05/28/2010 (5:49 am)
This is on my todo list for the project I'm working on. However, it shouldn't be too hard since there seem to be various methods, ranging from several cross-platform libraries to using Windows' UPnP APIs.MiniUPnP looks like a very good option. It's supposed to be lightweight and is used in quite a few projects, like the Transmission bittorrent client.
It's also worth look into the Windows Firewall API. It's best used during the game installation, since applications need administrator permissions to change firewall settings. Just write a small console/windowless application that sets up the firewall for you and have the installer run it during the installation.
Also, for maximum effectiveness you'll need a NAT punchthrough server of some sort, since some people like our friend above don't have UPnP enabled.
#3
The big complaint I get is users can't do the port forwarding (a 30 second job at best) and the game is all about having your friends play with you so I need the ability for those who have issues. I will look at that miniUPnP and see what can be done.
In the meantime I would like to find out how the rest of the community handles this issue.
Thanks....
05/28/2010 (11:08 am)
Well I have to agree with him as I disable that feature as well, it's an invitation for trouble. I can't afford my dev environment to get compromised.The big complaint I get is users can't do the port forwarding (a 30 second job at best) and the game is all about having your friends play with you so I need the ability for those who have issues. I will look at that miniUPnP and see what can be done.
In the meantime I would like to find out how the rest of the community handles this issue.
Thanks....
Torque 3D Owner Jacob S.
ADMCMA
I myself have never even used it and go as far as to intentially turn it off on my routers.