Fix "Unable to Find Package" NuGet Error in Visual Studio C#
In this article, I will show you how to enable Windows Firewall using Command Prompt. Using Command Prompt can be helpful, as you can run multiple commands quickly and easily.
Sometimes, you may need to fix network connectivity issues. In such cases, if you suspect that the firewall might be blocking traffic on domain, private, public, or any network, you can temporarily disable the firewall using the following command.
Note that there are 3 network in firewall that is
Domain Network
: This network is used when the computer is connected to a network with an Active Directory domain.
Private Network
: This network is used when the computer is connected to like home network.
Public Network
: This network is used when the computer is connected to public network like airport wifi, restuarant wifi etc.
fig. Showing private , public and domain network
I will show for each of them.
Open Command Prompt as administrator and then type below command
netsh advfirewall set domainprofile state off
This will disable all firewall on your system
After running the above command, you should test network connectivity to see if the issue related to the firewall blocking is resolved. If it is resolved, you can enable the firewall again.
Note: It is best practice to enable the network firewall back to maintain the security of your system.
For this open command prompt as administrator and then type below command:
netsh advfirewall set allprofiles state on
For this open command prompt as administrator and then type below command:
For this open command prompt as administrator and then type below command:
For this open command prompt as administrator and then type below command:
netsh advfirewall set privateprofile state off
For this open command prompt as administrator and then type below command:
netsh advfirewall set privateprofile state on
For this open command prompt as administrator and then type below command:
netsh advfirewall set publicprofile state off
For this open command prompt as administrator and then type below command:
For this open command prompt as administrator and then type below command:
netsh advfirewall show allprofiles
In this way we can easily enable and disable network profile using command line.