Are program-specific ports open when the program is deactivated? Why?

Basic questions. If I have a unique port open through port-forwarding for a program like Minecraft, is that port open when Minecraft is deactivated? Whatever the answer, why is that so?


Solution 1:

What John says in his answer is correct, but doesn't seem quite responsive to the question.

When people talk about a port being open, what they really mean is that there is a reachable port that will accept input which will be processed by a program. In order for network communication to occur, you need the Three P's: a Program that has created a Port, that is accessible by a Pathway between the two systems.

Ports are established by Programs, not things like firewalls or NAT configurations (those only address the Pathway), so if there isn't a process that has established a port with the OS and bound it to one or more IP interfaces on the system in question, the port is closed. It will not accept traffic, and even if it did, there isn't a program that will use that port for I/O. The OS will ignore any data sent to the port because the OS has no means to deal with it.

This is evident if you use a remote port scanner like ShieldsUp or a testing tool like canyouseeme.org. Try scanning your port while Minecraft is running and it will report open. If you scan it again when Minecraft is not running, you will see it report the port as closed.

Solution 2:

If you opened the port separately from Minecraft (the implication in your post is that you did), then the port (for port forwarding) will remain open.

Type netstat -ab in an admin command prompt to see what ports are listening.

You will need to close it (the way you opened it) if you do not want it open.

Solution 3:

Yes, because you opened it in your Router \ Modem \ Windows Firewall

An open port doesn't necessarily post a security issue, but a port scanner could determine what kind of programs or services you are using and try to explore it.