Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from Apr 2 '12 at 14:29

This question came from our site for system and network administrators.

Inbound or outbound? Have you configured Windows Firewall? – Miles Erickson Apr 2 '12 at 5:59
  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
share|improve this answer
does this work for localhost too? Because I can't block requests to my localhost with this rule unfortunately. – Capaj Aug 15 '14 at 16:21

You must log in to answer this question.