Would you like to learn how to configure the Windows firewall to block an IP address range? In this tutorial, we will show you how to configure the Windows firewall to block multiple IP addresses on a computer running Windows.
• Windows 2019
• Windows 2016
• Windows 2012 R2
• Windows 10
• Windows 7
Equipment list
Here you can find the list of equipment used to create this tutorial.
This link will also show the software list used to create this tutorial.
Windows Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Windows.
Tutorial Windows Firewall – Block an IP address list
As an administrator, start an elevated command prompt.
Configure the Windows firewall service to start automatically.
Start the Windows firewall service.
Enable the Windows firewall profiles.
As an administrator, start the application named Windows Defender Firewall with Advanced Security.
Create a new Inbound firewall rule.
Select the Custom option.
Select All programs.
Click on the Next button.
Select the option named These IP address and click on the Add button.
Create a firewall rule to deny the input of packets from a specific IP address.
Repeat the process to add multiple IP addresses or IP address ranges.
Select the option to block the connection.
Select the DOMAIN option.
Select the PRIVATE option.
Select the PUBLIC option.
Enter a description to the firewall rule.
In our example, we configured the Windows firewall to block the input of packets coming from multiple IP addresses.
Congratulations! You configured the Windows firewall to block a list of IP addresses.
Windows – Block an IP address list using the command-line
As an administrator, start an elevated command prompt.
Configure the Windows firewall service to start automatically.
Start the Windows firewall service.
Enable the Windows firewall profiles.
Create a firewall rule to deny the input of packets from a specific IP address.
Create a firewall rule to deny the input of packets from a list of IP addresses.
In our example, we configured the Windows Firewall to block the input of packets coming from the IP addresses 10.10.10.10 and 20.20.20.20.
Congratulations! You configured the Windows firewall to block a list of IP addresses.
Tutorial Windows – Verify the firewall configuration
As an administrator, start an elevated command prompt.
Verify the configuration of the firewall profiles.
Here is the command output.
Verify the configuration of the firewall rule named BLACKLIST.
Here is the command output.
Start the application named Windows Defender Firewall with Advanced Security.
Verify if your firewall rule is listed on the Inbound rules.
You are able to verify the firewall configuration.