2

How can I setup windows 7 firewall so that it blocks ALL inbound and outbound traffic of all kinds, unless I am connected to a network that is designated in network options as public?

I'd like to block Home and Private. Thanks for any advice.

3 Answers 3

2

The following worked when I tried it.

  1. Open the Start menu.
  2. In the search box, search for "Windows Firewall."
  3. In the search results, select "Windows Firewall with Advanced Security."
  4. In the "Overview" section, check to see which profile is active. By default, it should "Private Profile."
  5. Next, click on the link marked "Windows Firewall Properties."
  6. Select the tab labeled "Private Profile."
  7. Make sure that "Firewall State" is set to "On (recommended)."
  8. Under "Inbound Connections" click on the drop-down menu and select "Block all connections."
  9. Under "Outbound Connections" click on the drop-down menu and select "Block."
  10. Next to "Protected network connections," click the button marked "Customize."
  11. Make sure that all of the check boxes are marked, especially "Local Area Connection" and "Wireless Network Connection" (if present).
  12. Click the "OK" button. When that dialog closes, click the "OK" button on the next dialog.

Source

2
  • 3
    One might want to additionally try disabling the allow rules in outgoing, and anything in 'allow programs'. Though even then, it's worth bearing in mind that it stops a lot but not everything. Traffic still shows in wireshark so it doesn't block everything, though it seems there isn't anything one can do in the windows 7 firewall to totally block everything. It does block a lot though. Though some fundamental stuff is still sending and seeing packets as seen in wireshark.
    – barlop
    Commented May 8, 2014 at 21:52
  • ^ This. And it gets much worse in Windows 10. So instead you should install PFSense on a Virtual Machine, and route all your Windows traffic through that VM. (The question doesn't specify, but that's why you want to do what it asks: to make a good internet kill switch (for your VPN)) Commented Feb 17, 2018 at 21:55
2

On Windows 7 Home Premium:

  • Start | Control Panel | Firewall | "Advanced Settings"
  • This will open up "Windows Firewall with Advanced Security" Window
  • Click on Inbound Rules and New Rule
  • Rule Type: Custom
  • Program: All Programs
  • Protocol and Ports: Any
  • Scope: Any IP Address (both local and remote)
  • Action: Block the connection
  • Profile: Domain and Private (Untick Public)
  • Name: Make a name for this rule

Click on Finish

And now you have an inbound Rule that blocks All Application from accessing any IP on any Port on Domain and Private (Home or Work or Private Networks)

And now you have to make exactly the same rule under "Outbound Rules"

Note (Credit to barlop):

Although Windows Firewall does block a lot of things, it does not block ALL traffic. Barlop has added that WireShark still detects some traffic in and out of the system even when everything meant to be blocked using either method.

9
  • I haven't fully tested this but do you really need to make a rule for incoming, given that there is a 'block all' option in windows firewall properties for incoming?
    – barlop
    Commented May 8, 2014 at 8:15
  • 1
    and you should know that traffic still shows in wireshark, so it doesn't seem to block everything
    – barlop
    Commented May 8, 2014 at 21:50
  • Looks like I didn't notice the block all option.. so Ramhound's answer would probably more straightforward to do. Wireshark can see all incoming attempt to the machine, but there won't be any replies, or any outgoing.
    – Darius
    Commented May 8, 2014 at 23:06
  • 1
    The question said that on networks designated private, he wants to block all.. so that would imply no intranet there. Obviously he wants traffic in the public one 'cos he said he doesn't want to block in the public one. Your "assumption"(you called it that)that he will see traffic in the public one is correct but obvious given that he isn't blocking or looking to block anything in the public one. And what you're saying is a diversion from my point.Win7 firewall works on a per profile basis, nobody denies that.I'm talking of extent of blocking, -on the profile he is doing the blocking on-.
    – barlop
    Commented May 8, 2014 at 23:50
  • 1
    Thanks for that. I did misunderstand your original comment about the visible traffic. So wireshark can still see some traffic, even when the Windows 7 firewall said "Block all" on the correct profile.. this is what you mean right?
    – Darius
    Commented May 9, 2014 at 0:04
1

Rather than navigate through all these pages simply click on the Start button... type CMD in the search field... click Search. You'll see cmd.exe in the PROGRAM field. Click on cmd.exe. Your DOS box will come up. In it type ipconfig /release and hit Enter. This will shut down all inbound and outbound traffic.

To get inbound and outbound traffic running again simply run up this DOS box again ( I have my DOS box icon pinned to the Taskbar at the bottom of the screen ) and now type in

ipconfig /renew

and hit enter. All comes back to normal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .