Cookies Required This website uses cookies to deliver your resources. By using this website, you agree to our Use of Cookies.

Blocking incoming/outgoing connections from an IP address or a range of IP addressesArticle ID: 36

ON THIS PAGE

ISSUE

Your computer keeps connecting to an IP address you don't recognize and would like to block connections from this IP address.

RESOLUTION

Using IPSec Policies to block a specific IP addresses or hostnames


  1. Click on Start and then select Run...

  2. Notice: If you can't find the Run... item, press these keys together at the same time: Win+R
  3. Type the following into the Open field and click on OK: mmc.exe
  4. Click on File menu from the top and then select Add/Remove Snap-in... - See a screenshot
  5. Click on Add and select IP Security Policy Management then click on Add - See a screenshot
  6. When prompted, select Local computer and then click on Finish. Click on Close and then on OK
  7. From the right pane, click on IP Security Policies on Local Computer then right-click this item and select Create IP Security Policy... - See a screenshot
  8. A wizard should show up, click on Next to proceed with setting up the IP Security Policy that we will use to block the IP address(es)
  9. Insert a unique name that you can recognize for the new IP Security Policy into the Name field, in this example we will be using Block Google - See a screenshot
  10. Click on Next when you are done naming the IP Security Policy then click on Next once again
  11. If prompted, select an initial authentication method or leave Active Directory default (Kerberos V5 Protocol) ticked then click on Next
  12. Make sure that Edit properties is ticked and then click on Finish
  13. The properties of the new IP Security Policy should appear, click on Add to add a new rule in order to block the IP address(es) - See a screenshot
  14. Click on Next and keep This rule does not specify a tunnel ticked then click on Next - See a screenshot
  15. Leave All network connections ticked then click on Next
  16. If prompted, select an initial authentication method for the rule or leave Active Directory default (Kerberos V5 Protocol) ticked then click on Next
  17. Click on Add to specify a new IP filter, this is the filter that will be used by the rule to block the IP address(es) - See a screenshot
  18. Insert a name for the IP filter into the Name field, in this example we are going to use Block Google IPs
  19. Click on Add to start filtering the IP address(es) - See a screenshot
  20. A wizard should show up, click on Next to proceed with setting up the IP filter.
  21. In the Source address field, select My IP Address and click on Next - See a screenshot
  22. In the Destination address field, select A specific IP address

  23. Notice: If you want to block a website instead, select A specific DNS Name and type the website address (google.com for example; which is also used in this example)
  24. Insert the IP address to block into the IP address field (e.g: 1.2.3.4) and click on Next
  25. Leave Protocol type as Any to block all connections from this IP address and click on Next. Repeat step 18-23 to add more IP addresses.
  26. Click on Finish then on OK to save the IP filter
  27. Select the IP filter you have just created to specify it as the IP filter for the rule to use and click on Next - See a screenshot
  28. Select Block as the filter action, if you cannot see it, click on Add and then on Next. Name the new filter action as Block, click on Next and then select Block and then click on Finish
  29. Click on Apply to save the new IP Security Policy and then click on OK
  30. Back to the Console Root, click on IP Security Policies on Local Computer from the right pane and then from the left pane right-click the IP Security Policy you have created (called Block Google in this example) and select Assign to activate it. - See a screenshot

  31. Notice: To deactivate an IP Security Policy, right-click the policy and select Un-assign
  32. Congratulations! After selecting Assign your new IP Security Policy should be active and the IP addresses you have specified should be blocked - See a screenshot

Did you find this helpful?

Go back to Knowledgebase