Windows 7: Set up a firewall to prevent other hosts from accessing a port on this machine

  
        First understand the inbound rules and outbound rules: inbound is when someone visits you, and outbound is when you visit someone else. Open “Control Panel”->“System and Security>->“Windows Firewall”. Click "“Advanced Settings" on the left panel; the "Advanced Security Windows Firewall" window will appear: Click "“Inbound Rules" on the left side, then click "New Rule" on the right side, select “ Port”: Next” After selecting protocols and ports, such as TCP and 4000 ports: "Next" After selecting “Blocking connections>: Next, select as needed: Finally, set the name, click “Complete & rdquo;: The firewall will enable the new rule by default.
Copyright © Windows knowledge All Rights Reserved