How can I disable any TCP/IP port on a Windows 7 machine?

5

2

I need help on finding out how to disable any particular TCP/IP port on a Windows box whenever a need arises.

I googled before posting the question and I got links to articles mentioning only

  • disabling services for a particular port
  • disabling net bios ports
  • port forwarding on a router
  • etc

But none of these topic cover what I'm looking for.

ravanoid

Posted 2012-04-02T05:34:26.423

Reputation:

1Inbound or outbound? Have you configured Windows Firewall? – Miles Erickson – 2012-04-02T05:59:52.827

Answers

8

  1. Open Windows Firewall with Advanced Security
    enter image description here
  2. Select the Inbound Rules section
    enter image description here
  3. Create a new rule by clicking New Rule...
    enter image description here
  4. In the resulting dialog, chose Port as the rule type:
    enter image description here
  5. Now select if the rule should apply to TCP or UDP packets and what port should be filtered:
    enter image description here
  6. After that you'll want to select to Block connections:
    enter image description here
  7. You can now define what types of networks the rule should apply to:
    enter image description here
  8. Now give your rule a name and you're done:
    enter image description here

Der Hochstapler

Posted 2012-04-02T05:34:26.423

Reputation: 77 228

does this work for localhost too? Because I can't block requests to my localhost with this rule unfortunately. – Capaj – 2014-08-15T16:21:48.260