Jump to content
  • Advertisement
Sign in to follow this  
Plusekwal

How to add an exception in port forwarding?

This topic is 2514 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The multiplayer of my game for some computers works fine, however others are unable to connect with other players since some routers are blocking game packets. I know I need to add an exception in the port forwarding table of the router. What I don't know is how to do it.
I tried putting netsh add allowedprogram {app}\game.exe AppName ENABLE in the installation file of Inno 5.3.1, but it gave me an error.

Share this post


Link to post
Share on other sites
Advertisement
What error did it give you? Does the installer run with the privileges necessary for that command?

I don't see how that command is going to help you if the problem is a router along the way. Do you know where the packets are being dropped? What steps do you have to take manually to get the packets to work?

What protocol are you using? Is your code designed to traverse NAT?

Share this post


Link to post
Share on other sites
the error was
directive "netsh add allowedprogram {app}\game.exe AppName ENABLE" has no value[/quote]
I'm trying to add an exception in the port forwarding table using code. The protocol I use is TCP.

Share this post


Link to post
Share on other sites

the error was
directive "netsh add allowedprogram {app}\game.exe AppName ENABLE" has no value

I'm trying to add an exception in the port forwarding table using code. The protocol I use is TCP.
[/quote]

Are you sure the problem is the local machine, and not the router/firewall/cable/DSL modem ?

If you want to administer the firewall on a Windows machine from code (such as in your installer), you need:

1) To have administrative privilege elevation (typically set ALLUSERS=1 in your .msi file)
2) Use the INetFwMgr interface LocalPolicy property to change settings: http://msdn.microsoft.com/en-us/library/aa365287(v=VS.85).aspx
Here's another link: http://msdn.microsoft.com/en-us/library/aa366421(v=VS.85).aspx

Share this post


Link to post
Share on other sites
Parameters should probably be "firewall add allowedprogram" not just "add allowedprogram", and try using ENABLE ALL instead of just ENABLE. If you Google for Innosetup firewall exception there are many examples.

(And as others have already pointed out the Windows firewall has nothing to do with the router).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!