Thursday, March 22, 2012

How to tell what port a program needs open

This is an issue I run into.  Searching forums for threads that tell you what ports need to be open to let an application work properly.

Most of the time you can find these on their wiki or on the software's forums.  Sometimes the port is listed but its outdated information.

Here is a fairly quick and easy method to find out some information.

Tools needed, application running that is giving the issue, windows command prompt and  task manager.

Open Task manager and click on the processes tab.  The bottom right is a check box to show process from all users. Go ahead and check that.    Under the menue click view->select columns.

Check PID and press ok.

From the application you need to find the port for launch it and log into the server if possible.
Switch to command prompt and type in    netstat -ano

Look at task manager for the running application and write down the PID number.

For example a game  launcher.exe  has a pid of 8081.

looking at netstat for pid 8081 i see it is pointing to an external IP address and its using port 10781.

Bingo thats the port number i need to open.


Hope this helps people out.  If you are trying to open up ports for a game this may get you in the door, most games have ranges of ports that are a few hundred ports.  Way to many to open up for in my case.

If you can open up all ports for a given ip go that route. its a lot easier.