Would you like to learn how to block an IP address on Windows? In this tutorial, we will show you how to configure the Windows firewall to block 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 – Block IP address 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.
In our example, we configured the Windows Firewall to block the input of packets coming from the IP address 10.10.10.10.
Create a firewall rule to deny the output of packets to a specific IP address.
In our example, we configured the Windows firewall to block the output of packets sent to the IP address 10.10.10.10.
Congratulations! You configured the Windows firewall to block an IP address.
Tutorial Powershell – Block IP address on Windows
As an Administrator, start an elevated version of the Powershell command-line.
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 using Powershell.
Here is the command output.
In our example, we configured the Windows Firewall to block the input of packets coming from the IP address 10.10.10.10.
Create a firewall rule to deny the output of packets to a specific IP address using Powershell.
Here is the command output.
In our example, we configured the Windows Firewall to block the output of packets sent to the IP address 10.10.10.10.
Congratulations! You configured the Windows firewall to block an IP address using Powershell.
Tutorial Windows – Verify the firewall configuration
Start the application named Windows Defender Firewall with Advanced Security.
Verify the input rule blocking the IP address.
Verify the output rule blocking the IP address.
You are able to verify the firewall configuration.