长时间使用Windows 防火墙后,它可能会停止正常工作。(Windows Firewall)特别是如果您修改了其更高级的设置,或者您引入了许多更改。很难确定网络连接(network connectivity)问题的根本问题(root problem)。有效的一件事是将Windows 防火墙(Windows Firewall)恢复到其默认设置,以便它删除所有已创建的规则,并且您可以从头开始重新配置它。以下是进行此重置的四种不同方法:
注意(NOTE):本指南仅适用于您使用具有管理员权限的用户帐户。(user account)它涵盖Windows 10、Windows 7 和Windows 8.1。对于每种方法,我们都会提到它适用的Windows 版本。(Windows version)如果您不知道您拥有的Windows版本,请阅读:我安装了哪个版本的Windows ?。本机防火墙在Windows 10中被命名为Windows Defender 防火墙(Windows Defender Firewall),而在Windows 7和 Windows 8.1 中,它保留了旧名称Windows 防火墙(Windows Firewall)。在本文中,我们使用Windows 10的屏幕截图。
1. 如何将Windows 防火墙(Windows Firewall)重置为默认设置(所有Windows版本)
首先,您需要打开Windows 防火墙(Windows Firewall)。一种方法是打开控制面板(Control Panel),转到系统和安全(System and Security),然后单击或点击Windows Defender 防火墙(Windows Defender Firewall)。
在Windows Defender 防火墙(Windows Defender Firewall)窗口中,单击或点击窗口左侧的恢复默认值链接。(Restore Defaults)
您将了解恢复Windows 防火墙(Windows Firewall)的默认设置意味着什么。要继续,请单击或点击恢复默认值(Restore Defaults)。
Windows告诉您它将删除您自安装Windows以来所做的所有Windows Defender 防火墙(Windows Defender Firewall)设置。单击(Click)或点击是(Yes)继续。
您将返回到Windows Defender 防火墙(Windows Defender Firewall)窗口,所有防火墙规则现在都重置为其初始值,就像您第一次安装Windows时一样。
2. 如何使用Windows 安全性将(Windows Security)Windows Defender 防火墙(Windows Defender Firewall)重置为其默认设置(仅限Windows 10)
在 Windows 10 中,您可以从Windows 安全应用程序将(Windows Security)Windows Defender 防火墙(Windows Defender Firewall)恢复为其默认设置。在任务栏的搜索框中(search box),输入“防火墙和网络保护”("firewall & network protection"),点击或点击同名的搜索结果。(search result)
这将打开Windows 安全应用程序(Windows Security app),在其“防火墙和网络保护”(Firewall & network protection")部分设置。在底部,您可以找到“将防火墙恢复为默认值”的链接。("Restore firewalls to default.")单击或点击它。
将打开一个新窗口,其中解释了它的作用,以及它将如何删除所有Windows 防火墙(Windows Firewall)设置。单击或点击恢复默认值(Restore defaults)按钮。
Windows 10 要求您确认,因为该操作无法撤消。按是(Yes)完成重置。
您将返回到Windows 安全(Windows Security)应用,所有防火墙规则现在都重置为其初始值。
3. 如何从命令提示符将(Command Prompt)Windows 防火墙(Windows Firewall)重置为其默认设置(所有Windows版本)
您可以使用命令提示符(Command Prompt)(也称为CMD )将(CMD)Windows Defender 防火墙(Windows Defender Firewall)重置为其默认设置。以管理员身份打开命令提示符(Command Prompt),然后运行以下命令:netsh advfirewall reset
按键盘上的Enter键,Windows 防火墙(Windows Firewall)会立即重置。您只会收到一条短信说好的。🙂 同样的命令也可以在PowerShell中运行。
4. 如何使用PowerShell(所有Windows版本)将Windows 防火墙(Windows Firewall)重置为其默认值
以管理员身份打开 PowerShell(Open PowerShell),然后运行以下命令:(New-Object -ComObject HNetCfg.FwPolicy2).RestoreLocalFirewallDefaults()
按键盘上的Enter , Windows Defender 防火墙(Windows Defender Firewall)会立即重置,无需任何额外确认。
您是否通过重置(Did)Windows 防火墙(Windows Firewall)解决了您的问题?
从本指南中可以看出,将Windows Defender 防火墙(Windows Defender Firewall)恢复到默认设置很容易。也许您感染了更改了您设置的规则的恶意软件,或者在尝试手动配置Windows Defender 防火墙时设置已损坏。(Windows Defender Firewall)无论哪种方式,应用此过程都会使Windows Defender 防火墙(Windows Defender Firewall)再次工作。我们建议您立即开始设置新规则,因为您的某些应用在删除旧规则后可能无法运行。如果这解决了您的问题,请在下面的评论中告诉我们。
How to reset your Windows Firewall settings (4 methods)
After using the Windows Firewall for a long time, it might stop working as it should. Especially if you have modified its more advanced settings, or you have introduced many changes. It becomes difficult to pinpoint the root problem for your network connectivity issues. One thing that works is to restore the Windows Firewall to its default settings so that it deletes all the rules that were created, and you can start configuring it again from scratch. Here are four different methods to make this reset:
NOTE: This guide works only if you are using a user account with administrator permissions. It covers Windows 10, Windows 7, and Windows 8.1. For each method, we mention the Windows version in which it works. If you do not know the version of Windows that you have, read: What version of Windows do I have installed?. The native firewall is named Windows Defender Firewall in Windows 10 while in Windows 7 and Windows 8.1 it retains the old name of Windows Firewall. For this article, we use screenshots from Windows 10.
1. How to reset Windows Firewall to its default settings (all Windows versions)
First, you need to open the Windows Firewall. One way to do that is to open the Control Panel, go to System and Security, and click or tap Windows Defender Firewall.
In the Windows Defender Firewall window, click or tap the Restore Defaults link, on the left side of the window.
You are informed about what it means to restore the default settings for the Windows Firewall. To go ahead, click or tap Restore Defaults.
Windows tells you that it is going to delete all settings of Windows Defender Firewall that you have made since Windows was installed. Click or tap Yes to proceed.
You are returned to the Windows Defender Firewall window, and all the firewall rules are now reset to their initial values, as they were when you first installed Windows.
2. How to reset the Windows Defender Firewall to its default settings, with Windows Security (Windows 10 only)
In Windows 10, you can restore the Windows Defender Firewall to its default settings, from the Windows Security app. In the search box on the taskbar, enter the "firewall & network protection" and click or tap the search result with the same name.
This opens the Windows Security app, at its "Firewall & network protection" section with settings. On the bottom, you find the link for "Restore firewalls to default." Click or tap on it.
A new window is opened with an explanation of what this does, and how it is going to remove all Windows Firewall settings. Click or tap the Restore defaults button.
Windows 10 asks for your confirmation as the action cannot be reversed. Press Yes to complete the reset.
You are returned to the Windows Security app, and all the firewall rules are now reset to their initial values.
3. How to reset the Windows Firewall to its default settings from the Command Prompt (all Windows versions)
You can reset the Windows Defender Firewall to its default settings using the Command Prompt, also known as CMD. Open the Command Prompt as administrator, and run the following command: netsh advfirewall reset
Press Enter on your keyboard, and the Windows Firewall is reset immediately. You only receive a text message saying OK. 🙂 The same command can be run in PowerShell too.
4. How to reset the Windows Firewall to its defaults, using PowerShell (all Windows versions)
Open PowerShell as administrator, and run the following command: (New-Object -ComObject HNetCfg.FwPolicy2).RestoreLocalFirewallDefaults()
Press Enter on your keyboard, and the Windows Defender Firewall is reset immediately, without any additional confirmation.
Did you solve your problems by resetting the Windows Firewall?
As you can see from this guide, it's easy to restore the Windows Defender Firewall to its default settings. Maybe you were infected with malware which changed the rules you have set up, or the settings were corrupted along the way while trying to configure the Windows Defender Firewall manually. Either way, applying this procedure makes the Windows Defender Firewall work again. We recommend that you start to set new rules immediately, because some of your apps may not work after removing the old rules. Let us know in a comment below if this solved your problems.