[SOLVED] Windows firewall rules program+port both

johnyb98

Distinguished
Apr 3, 2015
114
1
18,585
Hi everyone.

Please, I would like help me understand something on the following on networking.

It's about when creating rules on Windows firewall. Are there any cases on which, in order a program to work for the remote connection, to need make Windows firewall rules both for the program and its port? And both inbound and outbound?

I have seen on a YouTube video that, for a remote desktop tool (RDT), the user makes both inbound and outbound rules and for both program+port.

I thought that since the port of a service/program says to Windows which program the request is sent for, only opening the port with a rule, would be enough, and no program rule would also needed.

Thank you for your time.
 
Solution
Not sure about remote desktop but you would need to use a program rule when you do not know the ports.

If you look at outbound session from something like a web browser the source port is random and the destination port would always be say 80 or 443. If you needed to block 1 web browser but not another you would have to block the program.

For a inbound session the port used by a program tends to be fixed so then the port and the program are the same. But that does not means it has to work that way. Many games host on random ports and then tell the remote machine what port to connect to. They also tend to put in dynamic port forwarding rules in the router with UPnP.
Not sure about remote desktop but you would need to use a program rule when you do not know the ports.

If you look at outbound session from something like a web browser the source port is random and the destination port would always be say 80 or 443. If you needed to block 1 web browser but not another you would have to block the program.

For a inbound session the port used by a program tends to be fixed so then the port and the program are the same. But that does not means it has to work that way. Many games host on random ports and then tell the remote machine what port to connect to. They also tend to put in dynamic port forwarding rules in the router with UPnP.
 
Solution