Jump to content

How to block a software in the Windows Firewall with command line?


vnoctober

Recommended Posts

I want to block an *.exe file in the Firewall. But I've only done manually. I want to do this using the command line for faster and share to my friends. Can someone help me?

Link to comment
Share on other sites


  • Replies 2
  • Views 976
  • Created
  • Last Reply

Top Posters In This Topic

  • H4rDw4rE

    1

  • khatulistiwa

    1

  • vnoctober

    1

Popular Days

Top Posters In This Topic

khatulistiwa

- Create a new rule to block it from the internet app on outbound firewall.
- Create a shortcut, and this key input.
to enable the rule.

netsh advfirewall firewall set rule name = "NameOfFirewallRule" new enable = yes

to disable the rule.

netsh advfirewall firewall set rule name = "NameOfFirewallRule" new enable = no

note: replace NameOfFirewallRule with the name of the rule that had been made.

- After a successful shortcut is created, you can change the shortcut icon.
- Shortcuts that can be shared with your friend, as long as they make a name of his rule, must match exactly the name of the rule in its key shortcut.
- Weaknesses in this way, you have to create 2 shortcuts (enable / disable the rule) to any rule, so if you want to create a shortcut for some rule, of course you have to create a shortcut that quite a lot.
-For Windows 8, before the execution of the shortcut, must be run with the run as admin or settings in order to keep its shortcut run as admin though without having to run as admin in the right click (right click on the shortcut> properties> shortcut> advanced> tick run as admin > ok> ok)

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...