This article describes how to block an IP address on a Windows Server by using the Windows Firewall.
Windows Firewall needs to be running on the server. To ensure the Windows Firewall is running, perform the following steps:
- Click Start, type
control panel, and click Enter.
- Click Windows Defender Firewall > Turn Windows Defender Firewall on or off.
You must have administrative privileges for the server to modify the Windows Firewall.
Log in to the server on which you need to block the IP address.
Click Start, type
Windows Firewall with advanced security, and press Enter.
In the left-hand pane, click Inbound Rules to show the currently configured rules in the middle pane.
In the right-hand pane, click Actions >New Rule....
- For Rule Type, select Custom and click Next.
- For Program, select All programs and click Next.
- For Protocol and Ports, select Any from the Protocol Type dropdown and click Next.
- For Scope:
- under Which remote IP addresses does this rule apply to? , select the radial option: These IP addresses: .
- Click Add....
- Enter the IP address that you want to block from the server and click OK. You can also choose to block a range of IP addresses by selecting theThis IP address range: radial option.
After you finish adding the IP addresses, click Next.
For Action, select Block the connection and click Next.
For Profile, leave all options checked and click Next.
For Name, give the rule a descriptive name, such as Blacklisted IPs. You can also enter an optional description of the rule.
The newly created rule with the given name now displays in the middle Inbound Rules pane. To order the rules alphabetically by name, you can click on the Name column header.
If you need to disable the rule, right-click on the rule in the list and click Disable Rule.
If you need to modify the scope of IP addresses for the rule, right-click the rule in the list and click Properties. Then click the Scope tab, make necessary changes, and click Apply.
Updated 18 days ago