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.

Windows - Elevated command prompt

Configure the Windows firewall service to start automatically.

Copy to Clipboard

Start the Windows firewall service.

Copy to Clipboard

Enable the Windows firewall profiles.

Copy to Clipboard

As an administrator, start the application named Windows Defender Firewall with Advanced Security.

Windows Defender Firewall with Advanced Security

Create a new Inbound firewall rule.

Windows firewall - New inbound rule

Select the Custom option.

Windows firewall - Custom rule

Select All programs.

Windows firewall - All programs

Click on the Next button.

Windows firewall - Protocol and ports

Select the option named These IP address and click on the Add button.

Windows firewall - Remote IP address

Create a firewall rule to deny the input of packets from a specific IP address.

Windows firewall - Block IP address

Repeat the process to add multiple IP addresses or IP address ranges.

Windows firewall - Blacklist

Select the option to block the connection.

Windows firewall - Block the connection

Select the DOMAIN option.

Select the PRIVATE option.

Select the PUBLIC option.

Windows firewall - profile configuration

Enter a description to the firewall rule.

Windows firewall - Blacklist IP address

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.

Windows - Elevated command prompt

Configure the Windows firewall service to start automatically.

Copy to Clipboard

Start the Windows firewall service.

Copy to Clipboard

Enable the Windows firewall profiles.

Copy to Clipboard

Create a firewall rule to deny the input of packets from a specific IP address.

Copy to Clipboard

Create a firewall rule to deny the input of packets from a list of IP addresses.

Copy to Clipboard

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.

Windows - Elevated command prompt

Verify the configuration of the firewall profiles.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Verify the configuration of the firewall rule named BLACKLIST.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Start the application named Windows Defender Firewall with Advanced Security.

Windows Defender Firewall with Advanced Security

Verify if your firewall rule is listed on the Inbound rules.

Windows - Block blacklist ip address

You are able to verify the firewall configuration.