Want to enable Windows Server firewall - how to know what ports to open

If you have access to a Linux machine, you can remotely scan the opened ports on your Windows servers, you will need to install on the Linux machine "nmap" for example, for RHEL based OS will be #yum install nmap , after this the command will be like this #nmap 12X.xxx.xxx.xxx and the output will display you all the opened ports from the foreign host.

This is an alternative to netstat but will require a Linux machine.

Note: I found you can run it also on Windows based systems, please take a look of this link [1]

[1] https://nmap.org/book/inst-windows.html