In this article, we will use TCP/IP filtering to prevent a server from allowing certain TCP ports or protocol.
1. Right-click on the My Network Places icon on the desktop, open properties
2. Choose the network connection for which you want to view the settings, right-click to open properties
3. double-click Internet Protocol (TCP/IP) to view network configuration settings.
4. Click the Advanced button, then Click the Options tab.
5. Select TCP/IP filtering and click the Properties button.
6. Check the box beside Enable TCP/IP Filtering.
7. Select Permit Only for TCP Ports, UDP Ports, and/or IP Protocols.
8. Click the Add button.
9. Enter the port or protocol number and click OK. In this example, we allow all TCP and UDP port, but allows only protocols 80, 53, 22 ( Http, DNS and SSH)
Figure-1 TCP/IP Filtering
10. After you are done, close all the dialog screens by clicking either OK or Close.
11. You will be prompted to reboot for the changes to take effect.
Please note, this filtering is applied to inbound traffic and does not affect outbound traffic.
You can refer to the IANA site for the full list of the Ports.