Wednesday, February 21, 2024

Creating liberating content

The World’s First Malaria...

Malaria expert Brian Greenwood had once resigned himself to the possibility that...

Business travel management platform...

TravelPerk, a business travel management platform targeted at SMEs, has raised $105...
HomeTechnologyHow to export...

How to export and import individual firewall rules on Windows 11


On Windows 11, the Microsoft Defender Firewall is a security feature that monitors incoming and outgoing network traffic to allow or block traffic depending on configured rules.

Although the default settings should be optimal for most users, you can create new custom rules to control the network access for apps and services. However, the Microsoft Defender Firewall settings, Command Prompt, or PowerShell do not provide an option to export a specific firewall rule.

In the case that you have to transfer a specific firewall rule to other devices without overwriting the current configuration, you can create a custom export file using the Registry and Notepad.

This guide will teach you the steps to export and import specific firewall rules on the same or other devices.

Export single firewall rule on Windows 11

On Windows 11, the only way to export a single firewall rule is to export all the rules and then modify the list to include only the rules you want to import using the Registry and Notepad.

Warning: Modifying the Windows Registry can cause serious problems if not used properly. It’s assumed you know what you’re doing and have created a full backup of your system before proceeding.

Export firewall rules from Registry

To export firewall rules from the Registry, use these steps:

  1. Open Start on Windows 11.

  2. Search for regedit and click the top result to open the Registry.

  3. Browse the following path:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy
  4. Right-click the FirewallRules key and select the Export option.

    Registry export FirewallRules

  5. Type the name for the “.reg” file.

    Registry save reg file on Windows 11

  6. Click the Save button.

Once you complete the steps, the exported file will contain all the firewall rules. The next step is to open the exported file with Notepad to remove the entries you don’t need or create a new “.reg” file containing only the entries you want to import into another system.

Create firewall export with one rule

To export a single firewall rule on Windows 11, use these steps:

  1. Open File Explorer.

  2. Open the folder with the FirewallRules key export.

  3. Shift + Right-click the file and select the Edit option from the lecagy context menu.

    Registry file open with Notepad

  4. Select the first three lines of the file.

  5. Right-click the selection and select the Copy option.

    Registry firewallrules copy entries

  6. Click the New tab button to create a new Notepad file.

  7. Right-click and choose the Paste option.

    Registry file paste intro

  8. Switch back to the file containing the FirewallRules key export.

  9. Carefully select the line containing the firewall rules to export, right-click the selection, and click the Copy option.

    Registry file exporting single firewall rule

  10. Switch back to the new Notepad files containing the three new lines.

  11. Position the typing cursor below the third line.

  12. Right-click and choose the Paste option.

    Paste firewall rule custom configuration file

  13. Repeat steps 10 through 13 to export multiple firewall rules on Windows 11.

  14. Click the File menu.

  15. Click the Save as option.

  16. Select a descriptive file name for the export.

  17. Click the Save button.

After you complete the steps, you will have a file containing only the firewall rules you need.

Import single firewall rule on Windows 11

To import a single firewall rule, use these steps:

  1. Open File Explorer.

  2. Open the location containing the modified “.reg” file containing the firewall to import.

  3. Double-click the “.reg” file.

  4. Click the Yes button.

    Import single firewall rule on Windows 11

  5. Click the OK button.

Once you complete the steps, you can open the Microsoft Defender Firewall on Windows 11 with the Advanced Security console to confirm the rule has been added.

We may earn commission for purchases using our links to help keep offering the free content. Privacy policy info.

All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.



Source link

Continue reading

The World’s First Malaria Vaccine Program for Children Starts Now

Malaria expert Brian Greenwood had once resigned himself to the possibility that a successful vaccine for the disease might not become available in...

Business travel management platform TravelPerk raises $105M

TravelPerk, a business travel management platform targeted at SMEs, has raised $105 million in a fresh equity-based round of financing led by SoftBank’s...