Skip to content

How To Blog

  • Best keto calculator 2020 and More
  • How to Add and Print Excel Background Images MS Office Tips
  • How to Enable Dark Mode in Android 10 How-To
  • How To Share An Excel File For Easy Collaboration Office Tips
  • 63 Best Google Docs Keyboard Shortcuts Google Software/Tips
  • Check If Your Website Is Mobile Friendly or Not How-To
  • How To Downgrade macOS OS X
  • 6 Tips To Fix When Your Computer Fan Is Loud Help Desk

How to Disable Windows Firewall With Command Line

Posted on September 10, 2021September 10, 2021 By blog_786 No Comments on How to Disable Windows Firewall With Command Line

How to Disable Windows Firewall With Command Line.

The Windows firewall is tricky. It limits your downloads at times, prevents you from connecting to your PC remotely and blocks applications from launching, which is very annoying. But for now, this is the top-notch security feature provided by Windows if you know how to use it. You can configure your firewall to block certain applications from accessing the Internet and protect your local data.

It is very easy to prevent applications from accessing the Internet using a graphical interface. just go to the start menu and search for “Firewall and Network Protection”. In the dialog box, click Domain Network and turn off the firewall. Likewise, you must turn off the firewall for the private and public network. If you need to turn off Internet-only firewall, turn off Public network-only firewall.

Disable Windows Firewall using command line

However, if you, like me, prefer to turn off Windows Firewall using the command line, here’s a quick way to do it on Windows 10 and 7.

Open a command prompt. Go to the Start menu, type Command Prompt. Right click it and select “Run as administrator”. This command requires elevated permissions to disable the firewall, so it must be run as administrator.

At the command prompt, type netsh advfirewall, disable the status of all profiles.

How to Disable Windows Firewall With Command Line

This will disable the firewall for all 3 networks. To turn it back on, replace “off” with “on”. netsh advfirewall sets the status of all profiles to

How to Disable Windows Firewall With Command Line

Like the terminal in macOS and Linux, Windows cmd also allows you to navigate through the last used commands using the up and down arrows on your keyboard. So, if you want to execute the previous last command, just press the up arrow once, edit the command (turn it off) and press Enter.

Block any application in firewall (command line)

To block any application in the firewall, we first need to understand what an inbound and outbound rule is. Inbound traffic rules define either block or allow an application to receive data on your computer. Outbound rules are defined to block or allow an application to send data from your computer.

Blocking something in the firewall using the GUI is very easy. All you have to do is go to firewall and network protection.

Click Advanced Options and go to the Outbound Rules tab. Click New Rule on the right side of the window. In the pop-up window, select the Rule Type as Program. Click Next, and further steps, such as specifying the path to the program, are self-explanatory.

However, doing the same with the command line is not as intuitive. First, you need to decide if you need to block the application from receiving or sending data from the Internet. Let’s say you want to prevent the Chrome app from accessing the Internet.

Next, we need to find the location of the EXE file on our system. It should usually be in C: Program Files unless you have manually defined it.

Go to the .exe file and copy the path. In my case for google chrome the path will be: C: Program Files (x86) Google Chrome Application chrome.exe

After locating the file, all you need to do is open a command prompt as administrator and enter the following command: netsh advfirewall firewall add rule name = “Chrome block” program = “C: Program Files (x86) Google Chrome Application chrome.exe “dir = out action = block profile = public

How to Disable Windows Firewall With Command Line

Now, when I open Chrome, Internet access is disabled.

How to Disable Windows Firewall With Command Line

Block any application in the firewall with its port number

If you want to block the application by port number. First, you need to determine the port number. To do this, go to the Start menu and type Resource Monitor. Right click it and select “Run as administrator”.

How to Disable Windows Firewall With Command Line

When the dialog box opens, go to the Networking tab and expand the Listening Ports section by clicking on it.

How to Disable Windows Firewall With Command Line

Once you get the port number, use the following command to block that specific port. netsh advfirewall firewall add rule name = “Chrome block” localport = 443 protocol = tcp dir = out action = block profile = public

How to Disable Windows Firewall With Command Line

If you are not sure of the exact port number, you can also block the port range by specifying port = 1000-2000.

To remove this outbound rule, enter the following give command with the rule name you specified earlier.

How to Disable Windows Firewall With Command Line

This should fix the situation, and Chrome should be able to access the Internet.

Packaging

These methods allow you to block any particular application from accessing the Internet. This can be used against suspicious applications to protect your data from being sent to private networks or the Internet. If you have any problems with the step, you can comment on the error and I can help you with the solution.

Read: How to reset TCP / IP on Windows, Linux and macOS

How-To, Windows Tags:Block any application in firewall (command line), Block any application in the firewall with its port number, comm?, disable, Disable Windows Firewall using command line, Firewall, How to Disable Windows Firewall With Command Line, Packaging, With

Post navigation

Previous Post: Instagram Music Isn’t Available in Your Region? Here’s How to Get it
Next Post: How to Play PC Games on Android

Related Posts

  • Move a Window with the Keyboard in Windows 7/8/10 How-To
  • how to fix if Windows 10 Mail App Not Working? Windows
  • TemplateMonster WordPress Theme Review – Build a Site With Ease How-To
  • Prevent Popup Notifications from Appearing on Your Windows Desktop How-To
  • Top 5 3D Modeling Apps for iPad Pro How-To
  • How to Schedule Messages on Google Messages How-To

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress

Recent Posts

  • Can I change the file type in Windows 10?
  • How to create line graphs in Google Sheets
  • Best Ways to Create Your Own 3d Printed Lithophanes?
  • Top 5 3D Modeling Apps for iPad Pro
  • How to Fix the “This site can’t be reached” Error in Google Chrome

Recent Comments

  1. How to reset Windows 10 from factory settings - How To Blog on The Easiest Way to Clean Install Windows 10
  2. How to reset Windows 10 from factory settings - How To Blog on 7 Best Programs to Immediately Install on Your New Computer
  3. How to reset Windows 10 from factory settings - How To Blog on What To Do If You Think Your Computer Or Server Has Been Infected With Malware
  4. 9 Best Ways to Fixing Safari Not Working on Mac? - How To Blog on How To Hard Reset a Mac OS X Computer & Reinstall The OS
  5. How to uninstall Avast antivirus on Mac - How To Blog on 4 Ways To Uninstall Apps On Mac
  • When Was The Internet Invented? 10 Facts You Probably Didn’t Know technology
  • What Does VHS Stand For? technology
  • How to Fix If Apple TV Not Responding to Remote? Hardware
  • How to Print a Google Doc With Comments How-To
  • How to Join a Minecraft Realm Gaming
  • Create a Portable Version of Any Application in Windows How-To
  • Top 7 Twitter Apps for Windows 10 Windows 10
  • How to Block/Remove Ads on Chrome, IE and Firefox Computer Tips

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version