Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I Export and Import specific Window Firewall rule (both Inbound and Outbound) ?

I can do Import / Export policy but it will use ALL rules not specific rule. Same with Export List, it can export all list of rules of Inbound or Outbound in plain CSV file but it is not helpful because no way to import it back.

I looked at netsh firewall and netsh advfirewall firewall too but they too don't seem to have option to export / import individual rule.

I am just wondering if it is even possible to archive this. I am using Windows 7 Professional

share|improve this question

Go to the following key from Windows Registry and export it to a *.reg file:

HKLM\System\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy

Edit the file in any text editor and remove the entries you don't want. Or you can go to WFwAS, delete any other rules and keep only the ones you want. Then do the step described above. You won't need to edit the reg file as it already contains only what you want.

Import the reg file on the computer you need and you will add only your selected rules. That's all.

Or you can try Windows Firewall Control which has a feature that does this thing. It can export and import only the selected rules in XML format:

http://binisoft.org/wfc.php
share|improve this answer

Once you have copied the rule, you can copy the scope data too. Just copy the data from the key and paste into the new rule on the new server. I had a deny IP rule with about a thousand IPs in the scope data that I was able to copy over to the new server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.