01. List all listening TCP ports with “netstat -anp tcp” in administrator’s CMD.
![netstat to list open tcp ports](https://www.simplifyit.com.sg/wp-content/uploads/2024/02/01-netstat-list-port.jpg)
02. Find PID associated with open ports requiring inbound connections.
![find PID for process owner](https://www.simplifyit.com.sg/wp-content/uploads/2024/02/02-find-process-owner-id.jpg)
03. Pipe tasklist to find to locate process owner’s name.
![](https://www.simplifyit.com.sg/wp-content/uploads/2024/02/03-pipe-tasklist-to-find.jpg)
04. User wmic to locate full executable paths of all processes you would like to pass Windows firewall.
![](https://www.simplifyit.com.sg/wp-content/uploads/2024/02/04-get-path-to-allow-fw.jpg)
05. Go to Control Panel, All Control Panel Items and select Windows Firewall.
![](https://www.simplifyit.com.sg/wp-content/uploads/2024/02/05-windows-firewall.jpg)
06. Select Allow an app or feature through WIndows Defender Firewall.
![GUI allow program through firewall](https://www.simplifyit.com.sg/wp-content/uploads/2024/02/06-allow-app-thru-fw.jpg)
07. Select Allow another app.
![](https://www.simplifyit.com.sg/wp-content/uploads/2024/02/07-allow-app-browse.jpg)
08. Copy from command line process’ full path, paste and click Open.
![paste process full path](https://www.simplifyit.com.sg/wp-content/uploads/2024/02/08-paste-full-path.jpg)
09. Click Add to add the program. Repeat process for all other running processes that are blocked.
![](https://www.simplifyit.com.sg/wp-content/uploads/2024/02/09-add.jpg)
Some applications may dynamically assign ports to listen to for inbound connections, adding the program itself will prevent allowing static ports in while blocking all others used by the process.