Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • eMMC vs SSD: What’s The Difference? Reviews
  • Ultimate Troubleshooting Guide for Windows 10 Not Going to Sleep Windows 10
  • Eight Places to Invest in Crowdfunding New Technology

    Before crowdfunding, the only way to make money for your latest and greatest tech product was to prostrate yourself to wealthy investors who are loo

  • How to Update Zoom on a Windows or Mac Computer Computer Tips
  • Record Audio Coming Out of Your PC Without Stereo Mix How-To
  • How to Record Skype Video Calls – Complete Guide How-To
  • How to Secure Facebook Account With Mobile in 4 Easy Steps How-To
  • Recover BIOS/CMOS Password using CMOSPwd How-To

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

  • Use Link2SD to Expand Internal Memory of Android How-To
  • How to Share Internet Connection in Windows 11 Computer Tips
  • How To Stop Edge From Running in the Background How-To
  • Quickly convert an image to text Microsoft Word 2021 How-To
  • Find and Fix Damaged MP3 Files How-To
  • Garmin connect app for windows 10 Software Reviews

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
  • 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
  • 5 Cool Websites to Find Good Movies and TV Shows on Netflix
DMCA.com Protection Status

Recent Posts

  • 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
  • This Simple Trick Lets You Play YouTube in the Background on iOS
  • How to Bypass Chromecast DNS and Circumvent Geo Blocking

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
  • Windows 10 Audio Crackling: 10 Ways To Fix The Problem Help Desk
  • How to Block Websites on Google Chrome on Windows How-To
  • Optimize Windows 7 Startup and Boot Time Featured Posts
  • HP OfficeJet Pro 8500 (A909n) Premier Review Gadgets
  • The Best SNES Emulators To Play Games Online Gaming
  • How to Play Minecraft: A Beginner’s Guide Gaming
  • How to set up iCloud Data Recovery Service General Software
  • 13 Troubleshooting Tips For When Dropbox Files Are Not Syncing Help Desk

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version