Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Free way to share photos with anyone in 2021 Computer Tips
  • How To Create Your Own Personal Stickers On WhatsApp (Android) How-To
  • The 7 Best PDF Readers for Windows In 2020 How-To
  • Block File Downloads in Internet Explorer How-To
  • The 7 Best N64 Racing Games Gaming
  • Microsoft Excel Basics Tutorial – Learning How to Use Excel

    In a 2018 article, human resources and financial industry firm Robert Half wrote that 63% of financial companies continue to use Excel as their prim

  • How to Find Duplicates In Rows And Cells In Google Sheets How-To
  • Latest Switch Games for Adults 2022 Gaming

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

Share this:

  • Twitter
  • Facebook
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

  • How To Delete Your Netflix Viewing History How-To
  • 4 Free VPNs That Work With Netflix (2018) How-To
  • vat calculator uae Windows
  • How To Enable Touch ID and Face ID on WhatsApp How-To
  • How to Convert WEBP and HEIC Files into Usable Formats How-To
  • CD or DVD Drive Won’t Eject or Open? How-To

Leave a Reply Cancel reply

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

Archives

  • September 2023
  • August 2023
  • July 2023
  • 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
  • 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

  • AI Tools & Guides
  • 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
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • 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
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • How to reset your SIM card
  • This Simple Trick Lets You Play YouTube in the Background on iOS
  • How to go Back to the old YouTube Layout (2013)
  • How to Bypass Chromecast DNS and Circumvent Geo Blocking
DMCA.com Protection Status

Recent Posts

  • 10 Things to Check Before Publishing a YouTube Video
  • MailTag: Real-time Email Tracking, Made Easy
  • Pokemon Sleep: what is it and how to play
  • How to Respond to Messages on Instagram (Mobile and PC)
  • How to reset your SIM card

Recent Comments

  1. This Simple Trick Lets You Play YouTube in the Background on iOS on YouTube Not Working? Here Are Quick Fixes To Try
  2. How to Bypass Chromecast DNS and Circumvent Geo Blocking on 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  3. 5 Cool Websites to Find Good Movies and TV Shows on Netflix on check netflix video quality internet explorer
  4. SmartDNS vs VPN “What’s the Difference?” on How to Watch Apple TV on Roku
  5. How to go Back to the old YouTube Layout (2013) on 10 Things to Check Before Publishing a YouTube Video
  • How To Erase Your iPhone Or iPad Remotely Tutorials
  • 10 Best Free Movie Apps to Watch Movies Online Smartphones
  • How to Get OneDrive to Stop Emailing Memories MS Office Tips
  • Best yugioh calculator 2020

    Best yugioh calculator 2020. 1 - YugiDuel LP Calculator for YuGiOh FREE Top Reviews Love this use it all the time. I en

  • How to Enable Dark Mode on WhatsApp Web How-To
  • How to Restore a Deleted Mailbox with PowerShell How-To
  • A Guide to Screen Mirroring an iPhone/iPad to a PC or Mac Tutorials
  • Best Brainstorming Apps for Mobile, PC, and Mac Software Reviews

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version