IP whitelist for remote desktop

I have a big list of IP ranges which I want to import to windows firewall. It is a pain to import them one by one.

Is there any automatic way to achieve that? A script that can create rules for port with large number of IPs? I hold them in a file.
And what about performance of a large IP based rule?

2 Answers

You can add IP range via Scope tab:

  1. Open the rule you created in Windows Firewall

  2. Click on the Scope tab.

  3. For remote IP addresses, click Add.

  4. Click This IP address range.

  5. For the first range, From: **** To:**** and click OK.

  6. Click OK one last time to save your rule.

You can refer to this Microsoft document:

1

Export rules, edit, then import

You could export the rules as a CSV or JSON file, edit them to include your new IP ranges, then import the rules back into the WIndows Firewall.

You may find these scripts useful:

Powershell scripts to export and import firewall rules in CSV or JSON format

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like