{"id":4516,"date":"2016-11-04T17:37:49","date_gmt":"2016-11-04T12:07:49","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=4516"},"modified":"2023-06-20T13:45:10","modified_gmt":"2023-06-20T08:15:10","slug":"reset-firewall-defaults-restore-rules-advanced-security","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/reset-firewall-defaults-restore-rules-advanced-security\/","title":{"rendered":"How to Reset Windows Firewall Settings to Defaults"},"content":{"rendered":"<p>You may want to occasionally reset Windows firewall settings or rules to clear any unused entries there in the aftermath of malware attack and removal, or when some of the networking features don&#8217;t work due to misconfiguration of the Windows Firewall.<!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4525 alignnone\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/firewall-rules-reset-0.png\" alt=\"reset windows firewall settings\" width=\"700\" height=\"300\" \/><\/p>\n<p>Windows Firewall has predefined Inbound and Outbound connection rules for built-in programs and services. In addition, applications create additional custom firewall rules as necessary. But, over time, some of those custom firewall exceptions (rules) may become obsolete, as the user may uninstall the corresponding programs from the system.<\/p>\n<p>This article tells how to backup your existing Windows Firewall rules, and then restore the default rules or settings &#8212; using Windows Firewall (with Advanced Security) console or using the Netsh.exe command.<\/p>\n<p><em>Screenshots in this article are taken from a Windows 10 PC. However, the information in this article applies to all versions of Windows, from Windows Vista through Windows 11.<\/em><\/p>\n<hr>\n<div id=\"toc\">\n<strong>Contents<\/strong><\/p>\n<ol>\n<li><a href=\"#launch\">Opening Windows Firewall (with Advanced Security) console<\/a><\/li>\n<li><a href=\"#backup_gui\">Backup and Restore Windows Firewall Using GUI<\/a><\/li>\n<li><a href=\"#backup_cmd\">Backup and Restore Windows Firewall Using Netsh<\/a><\/li>\n<li><a href=\"#reset_gui\">Reset Windows Firewall Using GUI<\/a><\/li>\n<li><a href=\"#reset_cmd\">Reset Windows Firewall Using Netsh<\/a><\/li>\n<li><a href=\"#reset_ps\">Reset Windows Firewall Using PowerShell<\/a><\/li>\n<li><a href=\"#reset_error\">Unrecoverable Windows Firewall error (0x3) when resetting<\/a><\/li>\n<li><a href=\"https:\/\/www.winhelponline.com\/blog\/windows-firewall-error-0x6d9-no-endpoints\/\">Firewall Error 0x6d9 &#8220;The snap-in failed to load&#8221;<\/a> (opens new page)<\/li>\n<\/ol>\n<\/div>\n<hr>\n<h3><a id=\"launch\"><\/a>Opening Windows Firewall (with Advanced Security)<\/h3>\n<p>You can start Windows Firewall (with Advanced Security) console by launching &#8220;<strong>wf.msc<\/strong>&#8221; from the Run dialog (Win + R).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4522 alignnone\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/firewall-rules-reset-6.png\" alt=\"reset windows firewall settings\" width=\"399\" height=\"206\" \/><\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/windows-firewall-error-0x6d9-no-endpoints\/\">Windows Firewall Error 0x6d9 \u201cThe snap-in failed to load\u201d<\/a><\/div>\n<hr>\n<h3><a id=\"backup_gui\"><\/a>Backup and Restore Windows Firewall Rules Using GUI<\/h3>\n<p>In Windows Firewall (with Advanced Security) console, select the topmost item, &#8220;Windows Firewall with Advanced Security on Local Computer&#8221;, in the left pane.<\/p>\n<p>Right-click on it and click &#8220;Export Policy&#8230;&#8221;. In the save dialog, mention the file name and save it. The file will have the extension .wfw (Windows Firewall &#8211; Policy file).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4524 alignnone\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/firewall-rules-reset-7.png\" alt=\"reset windows firewall settings\" width=\"600\" height=\"340\" \/><\/p>\n<p>Likewise, you can use the &#8220;Import Policy\u2026&#8221; option to import settings from an existing .wfw file.<\/p>\n<hr>\n<h3><a id=\"backup_cmd\"><\/a>Backup and Restore Windows Firewall Rules Using Netsh Command<\/h3>\n<p>To exports the current Windows Firewall settings to a file using command-line, open Command Prompt as administrator, and type:<\/p>\n<pre class=\"cmd\">netsh advfirewall export \"c:\\advfirewallpolicy.wfw\"<\/pre>\n<p>The above command saves the current firewall settings to a file named &#8220;advfirewallpolicy.wfw&#8221; on your D:\\ drive. Alter the file name and path as desired.<\/p>\n<p>Similarly, to import the firewall rules from an existing .wfw firewall policy file, use the &#8220;import&#8221; parameter of Netsh.exe.<\/p>\n<pre class=\"cmd\">netsh advfirewall import \"c:\\advfirewallpolicy.wfw\"<\/pre>\n<hr>\n<h3><a id=\"reset_gui\"><\/a>Reset Windows Firewall Using GUI<\/h3>\n<p>In the Windows Firewall (with Advanced Security) console, select the topmost item, &#8220;Windows Firewall with Advanced Security on Local Computer&#8221;, in the left pane.<\/p>\n<p>Right-click on it, and click <strong>Restore Default Policy<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4518 alignnone\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/firewall-rules-reset-2.png\" alt=\"reset windows firewall settings\" width=\"598\" height=\"337\" \/><\/p>\n<p>Click Yes when you see the following message.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4517 alignnone\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/firewall-rules-reset-1.png\" alt=\"reset windows firewall settings\" width=\"483\" height=\"253\" \/><\/p>\n<pre>Restoring the default policy will reset all changes to settings of Windows Firewall that you have made since Windows was installed.\u00a0 This may cause some programs to stop working.\r\nIf you are remotely managing this computer, the connection will be lost when default policy is restored.\r\n\r\nDo you want to continue?<\/pre>\n<hr>\n<h3><a id=\"reset_cmd\"><\/a>Reset Windows Firewall Using Netsh<\/h3>\n<p>Open Command Prompt as administrator. Type the following command and press ENTER<\/p>\n<pre class=\"cmd\">netsh advfirewall reset<\/pre>\n<p>You should see the text &#8220;OK&#8221; in the output.<\/p>\n<div class=\"qt\">\n<h4>Quick Tip: Backup and Reset using a single command-line<\/h4>\n<p>To backup the existing Windows Firewall settings to a file and reset the Windows Firewall, use the following command:<\/p>\n<pre class=\"cmd\">netsh advfirewall reset export \"c:\\advfirewallpolicy.wfw\"<\/pre>\n<\/div>\n<hr>\n<h3><a id=\"reset_ps\"><\/a>Reset Windows Firewall Using PowerShell<\/h3>\n<p>Start PowerShell as administrator, and run the following command to reset the Windows Firewall:<\/p>\n<pre class=\"powershell\">(New-Object -ComObject HNetCfg.FwPolicy2).RestoreLocalFirewallDefaults()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4673\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/reset-firewall-powershell.png\" alt=\"reset firewall using powershell\" width=\"700\" height=\"114\" \/><\/p>\n<p>After resetting, some programs will ask you to add firewall exceptions for them to work correctly. Here is a Windows Security alert screenshot showing the message &#8220;Windows Firewall has blocked some features of this app&#8221; when launching Google Chrome.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4521 alignnone\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/firewall-rules-reset-5.png\" alt=\"reset windows firewall settings\" width=\"527\" height=\"381\" \/><\/p>\n<p>All you need to do is click &#8220;Allow access&#8221; if you want to let the program access the internet.<\/p>\n<hr>\n<h3><a id=\"reset_error\"><\/a>Unrecoverable Windows Firewall error (0x3) when resetting the Windows Firewall<\/h3>\n<p>You may sometimes receive the following errors when resetting Windows Firewall:<\/p>\n<p>The following error may be shown (in Windows Firewall with Advanced Security):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4520 alignnone\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/firewall-rules-reset-4.png\" alt=\"reset windows firewall settings\" width=\"600\" height=\"401\" \/><\/p>\n<pre class=\"err\">Could not restore the default policy.\r\nError: 3<\/pre>\n<p>And the Netsh command-line shows a similar error when resetting the Firewall:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4519 alignnone\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/firewall-rules-reset-3.png\" alt=\"reset windows firewall settings\" width=\"599\" height=\"124\" \/><\/p>\n<div class=\"err\"><strong>An unrecoverable Windows Firewall error (0x3) occurred.<\/strong><\/div>\n<h4>Fix for unrecoverable error 3 (0x3) when resetting Windows Firewall<\/h4>\n<p>The above error(s) occur if the registry key that stores the default Windows Firewall rules set is missing &#8212; malware may have wiped out the key. To restore the Windows Firewall rules template, download <a href=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/w10_firewall_default_rules.zip\"><strong>w10_firewall_default_rules.zip<\/strong><\/a> (for Windows 10), unzip, and run the enclosed REG file.<\/p>\n<p>This restores the required entries under the following registry key:<\/p>\n<pre>HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\SharedAccess\\Defaults\\FirewallPolicy\\FirewallRules<\/pre>\n<p>After applying the REG file, try resetting the Windows Firewall again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may want to occasionally reset Windows firewall settings or rules to clear any unused entries there in the aftermath of malware attack and removal, or when some of the networking features don&#8217;t work due to misconfiguration of the Windows Firewall.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[669],"class_list":["post-4516","post","type-post","status-publish","format-standard","hentry","category-windows","tag-windows-firewall"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":75948,"url":"https:\/\/www.winhelponline.com\/blog\/firewall-error-0x8007045b-0x8007042c\/","url_meta":{"origin":4516,"position":0},"title":"How to Fix Windows Firewall Errors 0x8007045b and 0x8007042c","author":"Ramesh","date":"July 14, 2024","format":false,"excerpt":"When you attempt to start, stop, or reset the Windows Defender Firewall, the error code 0x8007045b or 0x8007042c may appear: Windows could not stop the Windows Firewall service on Local Computer. The service did not return an error. This could be an internal Windows error or an internal service error.\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"firewall error 0x8007045b or 1068","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/07\/defender-firewall-1068.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/07\/defender-firewall-1068.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/07\/defender-firewall-1068.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/07\/defender-firewall-1068.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":38073,"url":"https:\/\/www.winhelponline.com\/blog\/windows-firewall-error-0x6d9-no-endpoints\/","url_meta":{"origin":4516,"position":1},"title":"Windows Firewall Error 0x800706D9 &#8220;The snap-in failed to load&#8221;","author":"Ramesh","date":"April 12, 2023","format":false,"excerpt":"When you open the Windows Firewall (with Advanced Security) applet, the following error may show up: There was an error opening the Windows Defender Firewall with Advanced Security snap-in The Windows Defender Firewall with Advanced Security snap-in failed to load.\u00a0Restart the Windows Defender Firewall service on the computer that you\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"windows firewall unsafe settings - reset","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/04\/firewall-error-use-recommended-settings.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/04\/firewall-error-use-recommended-settings.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/04\/firewall-error-use-recommended-settings.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/04\/firewall-error-use-recommended-settings.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":55021,"url":"https:\/\/www.winhelponline.com\/blog\/store-error-80072efd-80072efe-80d02002-80072ee2\/","url_meta":{"origin":4516,"position":2},"title":"Store Error 0x80072EFD, 0x80072EFE, 0x80D02002 or 0x80072EE2","author":"Ramesh","date":"June 20, 2023","format":false,"excerpt":"You may be unable to install or update apps in your Microsoft Store. Nothing may happen when clicking \"Install\" to install a Store app. The \"Microsoft-Windows-Store\/Operational\" event log may record the following errors: NULL Error: Unknown HResult Error code: 0x80072ee2 Source (111) 0x80072ee2 = ERROR_INTERNET_TIMEOUT Task Category: Gaming Services. Or\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"Store Error 0x80072EFD, 0x80072EFE, 0x80D02002 or 0x80072EE2","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/06\/store-error-0x80072ee2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/06\/store-error-0x80072ee2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/06\/store-error-0x80072ee2.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/06\/store-error-0x80072ee2.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":6377,"url":"https:\/\/www.winhelponline.com\/blog\/calculator-does-not-work-windows-10\/","url_meta":{"origin":4516,"position":3},"title":"Fix: Calculator Does Not Work in Windows 10 or 11","author":"Ramesh","date":"August 1, 2018","format":false,"excerpt":"The built-in Calculator app is a UWP (modern) app in Windows 10 and 11. This post tells you how to fix the Windows modern Calculator app when it fails to open or crashes a moment after opening. Step 1: Reset Windows Calculator Open Settings, and click Apps Click Apps &\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"uninstall windows calculator powershell","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2018\/08\/w10-calculator-uninstall-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2018\/08\/w10-calculator-uninstall-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2018\/08\/w10-calculator-uninstall-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2018\/08\/w10-calculator-uninstall-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":75564,"url":"https:\/\/www.winhelponline.com\/blog\/how-to-fix-error-0x80073d0a-in-microsoft-store\/","url_meta":{"origin":4516,"position":4},"title":"How to Fix Error 0x80073D0A in Microsoft Store","author":"Ramesh","date":"June 16, 2024","format":false,"excerpt":"When you install apps in the Microsoft Store, the error code 0x80073D0A may appear. App installation failed with error message: error 0x80073D0A: Failed to install package\u00a0<package name> because the firewall service is not running. Ensure that the firewall service is enabled and started. (0x80073d0a) ERROR_INSTALL_FIREWALL_ SERVICE_NOT_RUNNING 0x80073D0A The package couldn't\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"store error 0x80073d0a - firewall service disabled 0x80070422","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/06\/0x80070422-firewall-service.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/06\/0x80070422-firewall-service.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/06\/0x80070422-firewall-service.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/06\/0x80070422-firewall-service.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":339,"url":"https:\/\/www.winhelponline.com\/blog\/enable-and-disable-windows-firewall-quickly-using-command-line\/","url_meta":{"origin":4516,"position":5},"title":"Enable and Disable Windows Firewall Quickly using Command-line","author":"Ramesh","date":"June 19, 2008","format":false,"excerpt":"When testing network connectivity or when performing other troubleshooting tasks, you may need to turn off the Windows Firewall temporarily. To quickly disable or enable the Windows Firewall, you may use the Netsh.exe command-line in Windows 10 and Windows 8. Enable and Disable Windows Firewall Quickly using Command-line To disable\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"windows firewall turned off - security center","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/06\/firewall-turned-off-settings.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/06\/firewall-turned-off-settings.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/06\/firewall-turned-off-settings.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/06\/firewall-turned-off-settings.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/4516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=4516"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/4516\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=4516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=4516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=4516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}