Sign in to follow this  
Plusekwal

How to add an exception in port forwarding?

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 [code]netsh add allowedprogram {app}\game.exe AppName ENABLE[/code] 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
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
[quote] 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
[quote name='Plusekwal' timestamp='1317308805' post='4867223']
the error was
[quote] 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.
[/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: [url="http://msdn.microsoft.com/en-us/library/aa365287(v=VS.85).aspx"]http://msdn.microsoft.com/en-us/library/aa365287(v=VS.85).aspx[/url]
Here's another link: [url="http://msdn.microsoft.com/en-us/library/aa366421(v=VS.85).aspx"]http://msdn.microsoft.com/en-us/library/aa366421(v=VS.85).aspx[/url]

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

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