Search Our Database

Blocking IP Addresses Using Windows Firewall

Last updated on |
by

Introduction

This guide explains how to block a specific IP address on your Windows Server using the built-in
Windows Defender Firewall with Advanced Security. Blocking suspicious or malicious IPs helps enhance server security.

Prerequisite

  • Remote Desktop (RDP) access to the Windows Server
  • Administrator privileges

Step-by-Step Guide

Step 1: Log in to the Server

Use Remote Desktop to log in to your server as an administrator.

Step 2: Open the Windows Firewall Console

  1.  Press  🪟 + R to open the Run dialog box.
  2. Type  wf.msc   and press Enter.
  3. The Windows Defender Firewall with Advanced Security window will open.

Step 3: Create a New Inbound Rule

  1. In the left panel, select Inbound Rules.
  2. In the right panel, click New Rule….
  3. Select Custom and click Next.

Step 4: Program Settings

Leave the default setting All programs selected and click Next.

Step 5: Protocol and Ports

Keep the protocol type as Any and click Next.

Step 6: Scope (IP Address Blocking)

  1. Under Which remote IP addresses does this rule apply to?, select These IP addresses.
  2. Click Add, enter the IP address you want to block, and click OK.
  3. You can add multiple IPs if needed. Click Next when done.
  4. Select the radio button next to Block the connection and click Next.

Step 8: Profile Selection

Select the network profiles where this rule should apply. For full protection, make sure all three options are checked:

  • Domain – Applies when the computer is connected to a domain network.
  • Private – Applies to trusted networks like home or office.
  • Public – Applies to open or public networks, such as in cafes or airports.
    Once selected, click Next to proceed.

Step 9: Name the Rule

Give your rule a meaningful name (e.g., Block IPs )  and click Finish.

Step 10: Verify the Rule

Under Inbound Rules, locate the rule you just created.Verify Rule

Conclusion

The IP address has now been successfully blocked from initiating any inbound connections to your Windows Server. You may repeat the same steps to block additional IP addresses as needed.

If you require further assistance or encounter any difficulties, feel free to reach out to our support team at support@ipserverone.com. We are ready to help.