• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Which port to open for a program to communicate with computer ?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

manishrathi

Registered
Joined
Feb 25, 2009
How to find out which port number to open so that a program can communicate with my computer ?

How to find out whether to open TCP or UDP port ?

There are thousands of ports. Will the communication take place through port number which I open or do I need to know which port number to open for communication to take place ?

If I need to know which port number to open for a particular program to communicate with my computer, how do I figure out on which port communication will take place ?

Thanks
 
There is no explanation given in the link provided.
I am still confused with which port to open. Can someone please provide explanation in lay man terms about opening port for a program to communicate with computer.

Thanks
 
OK, well, what port you open depends on the program. That site I linked may have your software and the ports it requires listed. It will gives instructions on how to do so for each router. Seriously, browse around it and look for what you need. I would help you but you haven't listed any of your specifics.

I am assuming that you are having problems because you are sitting behind a router.

Read what port forwarding is here:

http://en.wikipedia.org/wiki/Port_forwarding

Most pertitent to you is this paragraph:
In a typical home networking setup, internet access is through a DSL or cable modem. The modem may be connected to a router, which is then connected to the networked computers by Ethernet or WiFi. The router is the device that the Internet sees; it holds the public IP address. The computers behind the router, on the other hand, are invisible to the Internet as they hold a local IP address each. Port forwarding is necessary in the router because computers will send information directed to the public IP address and the router needs to know where to send that information.[4]
 
Here is more elaboration regarding my confusion.

Sometimes a program is blocked by firewall. In this situation, we need to open a port to allow this program to communicate with computer.

How do I know, which port to open for communication.

As answered in this post, if application is configured to use a specific port and if I open a different port, will program be able to communicate through the firewall ?

I was reading about system security. In there, its stated that, I can allow a program through firewall. Now allowing a program thru firewall and opening a port are two different things.

When I look in the "windows firewall with advanced security" and create "New Rule", I see separate radio buttons for Program and Port. Program radio button allows a program thru firewall. What does Port radio button do ? If it allows a program thru that specific port then how do I know which port number to provide. If program is communicating thru specific port number and if I provide any arbitrary port number, will the program be able to communicate thru this arbitrarily provided port number ? If not, then how do I find out which port number to provide form a particular prohgram ?

thanks
 
Here is more elaboration regarding my confusion.

Sometimes a program is blocked by firewall. In this situation, we need to open a port to allow this program to communicate with computer.

How do I know, which port to open for communication.

As answered in this post, if application is configured to use a specific port and if I open a different port, will program be able to communicate through the firewall ?

I was reading about system security. In there, its stated that, I can allow a program through firewall. Now allowing a program thru firewall and opening a port are two different things.

When I look in the "windows firewall with advanced security" and create "New Rule", I see separate radio buttons for Program and Port. Program radio button allows a program thru firewall. What does Port radio button do ? If it allows a program thru that specific port then how do I know which port number to provide. If program is communicating thru specific port number and if I provide any arbitrary port number, will the program be able to communicate thru this arbitrarily provided port number ? If not, then how do I find out which port number to provide form a particular prohgram ?

thanks

for anyone to better provide you with help its best to name the program your trying to use and then we can help you better,

so my question to you is what is the name of the program and if the port is different then the program uses it wont work as you need to know the port the program uses
 
Here is more elaboration regarding my confusion.

Sometimes a program is blocked by firewall. In this situation, we need to open a port to allow this program to communicate with computer.

How do I know, which port to open for communication.

As answered in this post, if application is configured to use a specific port and if I open a different port, will program be able to communicate through the firewall ?

I was reading about system security. In there, its stated that, I can allow a program through firewall. Now allowing a program thru firewall and opening a port are two different things.

When I look in the "windows firewall with advanced security" and create "New Rule", I see separate radio buttons for Program and Port. Program radio button allows a program thru firewall. What does Port radio button do ? If it allows a program thru that specific port then how do I know which port number to provide. If program is communicating thru specific port number and if I provide any arbitrary port number, will the program be able to communicate thru this arbitrarily provided port number ? If not, then how do I find out which port number to provide form a particular prohgram ?

thanks

Adding a rule for a program means windows allows that program to access the internet using any port. Adding a rule for a port means windows lets any program access the internet through that port.

If you want to give a program access to the network by opening a port manually, you have to know what port the program is designed to use.
 
If you want to give a program access to the network by opening a port manually, you have to know what port the program is designed to use.


Please let me know, how to find out port number a program will use ? In what documentation is this information provided about port number ? Is it possible that there are two different programs, which are designed to use same port number ? If yes, how to dealk with this kind of situation ?

thanks
 
Please let me know, how to find out port number a program will use ? In what documentation is this information provided about port number ? Is it possible that there are two different programs, which are designed to use same port number ? If yes, how to dealk with this kind of situation ?

thanks

Maybe if you've told what program you're trying to get working, then someone could have given you an answer to your question. Help us help you.

There are two types of communications: inbound and outbound
There are two ports listed in packet headers: local and remote

Typically, outbound communication is not restricted. When you allow a program in your firewall, you're allowing it to communicate to remote hosts. If the program requires remote hosts to initiate communications with it, then the following needs to happen:
1) The firewall needs to be configured to allow inbound communication, either globally or specifically for the application

2) The inbound port needs to be forward on the router, if one is being used.

If you need to find out the port for a program that needs to receive communication from external hosts, you may use the netstat -a -o and the tasklist commands. First run tasklist and look for the name of the application, then match it to the PID. Run netstat -a -o to see which ports the application (displayed as the PID) is using or listing on. Keep in mind that the program may be listening on several different ports.
 
Please let me know, how to find out port number a program will use ? In what documentation is this information provided about port number ? Is it possible that there are two different programs, which are designed to use same port number ? If yes, how to dealk with this kind of situation ?

thanks

In addition to what TempliNocturnus suggested, a lot of times you can just google search the program name and you can find it that way. The program documentation might list it as well. If none of that works, try calling the company's tech support.
 
You will find that people do not respond well to help requests if you are not willing to provide all asked information. It is considered rude.

Having said that..

So instead I will do another thing that is considered rude on forums...

Have you tried googling your app plus the words port forwarding?

If you are not willing to disclose the application you are having trouble with (and possibly other issues that are not related to firewalls at all based on user experience here) this is the best that can be offered to you IMHO.
 
Thanks for the detailed answer TempliNocturnus.

Still one thing is not clear. If computer is already listening to a program on a particular port number, does it not mean that program is already coming thru the firewall.
A program or application, which is blocked by the firewall, will it be listed as being listened on a port ?

As I have already explained, I am novice for these firewall issues. I dont have an example of a program which I am trying to let thru the firewall. These are confusions which I am trying to clear.

Thanks
 
Thanks for the detailed answer TempliNocturnus.

Still one thing is not clear. If computer is already listening to a program on a particular port number, does it not mean that program is already coming thru the firewall.
A program or application, which is blocked by the firewall, will it be listed as being listened on a port ?

As I have already explained, I am novice for these firewall issues. I dont have an example of a program which I am trying to let thru the firewall. These are confusions which I am trying to clear.

Thanks

Listening means just that: the program is listening for any inbound communication on a given port. Regardless of whether your firewall is blocking the inbound communication, or the network cable is unplugged, that program will listen. The only thing that will stop a program from listening is if you close it, or if you deny it access to Windows networking components. The later is done with firewalls capable of low-level application rules; something Windows Firewall w/ Advanced Security lacks (I think).

If you need to test to see whether a port is forwarded correctly, or whether your firewall may be blocking inbound communications, go to http://www.canyouseeme.org/ and punch in the port number the program is listening on. This is a very useful troubleshooting tool.
 
I tried www.canyouseeme.org

IP address I get by using "ipconfig" is 192.168.1.104

IP address that appears automatically for checking is 99.244.63.190
When I enter portr number for this IP address, I get message
"Error: I could not see your service on 99.244.63.190 on port (7867)
Reason: Connection timed out"

Why does IP address appearing automatically for checking is different than the one I get with ipconfig ?

thanks
 
I tried www.canyouseeme.org

IP address I get by using "ipconfig" is 192.168.1.104

IP address that appears automatically for checking is 99.244.63.190
When I enter portr number for this IP address, I get message
"Error: I could not see your service on 99.244.63.190 on port (7867)
Reason: Connection timed out"

Why does IP address appearing automatically for checking is different than the one I get with ipconfig ?

thanks

That's because of something called NAT (Network Address Translation). You're behind a router and you are located somewhere on the east portion of Canada (Try not to post a public IP -the 99.244.x.x-, if you value your privacy/security).

That 99.244.x.x IP, aka your public IP, is what the internet sees your computer as you traverse it. Your router has a slightly sophisticated method of replacing that public IP with your private IP, and vice versa, when sending and receiving internet communication.

If you would like your host, 192.168.1.104, to be able to receive inbound communications on port 7867, then you need to first tell your router to send all incoming packets having a destination port of 7867 to the host 192.168.1.104. This is called port forwarding. Since all external host (computers on the WWW) see any computer you have connected to your router as 99.244.x.x, your router may only forward a port to one of your computers. If a port forwarding rule is not set up, the router will generally drop the packet.

The next thing you must do, if you haven't done so already, is create a rule for your firewall to allow the traffic for the particular program. You may either tailor the rule to only give the program access to what it needs (more difficult, but more secure), or you may just un-restrict any and all communications for that program (much easier, but potentially less secure).
 
Back