Blocking IP addresses in Windows helps manage network security and reduce unwanted connections. It prevents specific IPs from accessing a system or entire network. Whether addressing malicious traffic, enforcing network restrictions, or restricting access to certain services, Windows includes native options for reliable IP blocking.

The Windows Defender Firewall is a core component of the operating system’s security framework, providing granular control over both inbound and outbound traffic. By creating custom rules, administrators can deny connections from targeted IP addresses, protect the network from unauthorized access, and log relevant traffic events. These rules can be tailored using IP addresses, ports, or protocols for precise filtering.

Alternative methods include modifying the hosts file or using PowerShell scripts, but Windows Defender Firewall remains an accessible option without external software. It leverages system-level policies to apply restrictions globally, ensuring robust network security. Understanding how to set up these rules is vital for preventive measures and administrative oversight.

Steps to block an IP address using Windows Defender Firewall:

  1. Open Control Panel from the Start menu.
  2. Go to System and Security and click Windows Defender Firewall.

    You can find this option under the Control Panel's main menu.

  3. On the left, select Advanced settings.
  4. In the left pane, choose Inbound Rules.
  5. Right-click Inbound Rules and choose New Rule.
  6. Select Custom as the rule type.
  7. Proceed to the Scope tab.

    This is where you can define which remote IP addresses are affected by the rule.

  8. Under Which remote IP addresses does this rule apply to, select These IP addresses.
  9. Click Add and enter the IP address to block.
     127.0.0.1 badwebsite.com 

    The IP address you enter here will be blocked from making inbound connections.

  10. Click Next, then select Block the connection.
  11. Continue clicking Next until you reach the Name tab.

    Use a descriptive name for easy identification later.

  12. Assign a name for the rule and click Finish.
  13. Repeat these steps under Outbound Rules if needed.

    Blocking an IP for outbound connections will prevent your system from initiating connections to that IP.

Discuss the article:

Comment anonymously. Login not required.