Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows Server » Block IP Addresses Using Group Policy (GPO) in Active Directory
  • Spell Check Not Working in Microsoft Word
    How to Fix Spell Check Not Working in Microsoft Word Microsoft Exchange/Office/365
  • screenshot 2020 04 27 at 17.34.38
    Remote Server Administration Tools: Install RSAT on Windows Windows Server
  • We cannot fine camera
    Fix we could not find a camera compatible with Windows Hello Face Windows
  • SSD Trim and Disable delete operaion from ending up in Recycle bin
    SSD TRIM: Delete files permanently without using the Recycle Bin Windows
  • Screenshot 2024 02 09 at 1.06.54 PM
    Programmatically Deploying App Service Resources in Azure AWS/Azure/OpenShift
  • 517443 637286201540125528 16x9 1
    User account and process management in Linux Linux
  • TeamPass Password manager
    Install and configure TeamPass Password Manager Password Manager
  • windows admin center banner 825x400 1
    Fix failed to create new Scheduled Task RemoteException Windows Server

Block IP Addresses Using Group Policy (GPO) in Active Directory

Posted on 19/11/202420/11/2024 Matthew By Matthew No Comments on Block IP Addresses Using Group Policy (GPO) in Active Directory
How to Block IP Addresses Using Group Policy (GPO) in Active Directory
How to Block IP Addresses Using Group Policy (GPO) in Active Directory

Blocking specific IP addresses using Group Policy can be helpful when you want to restrict internet access or control network traffic on certain devices in an Active Directory environment. This guide will walk you through how to block IP addresses using Group Policy (GPO) in Active Directory by creating a Group Policy Object (GPO) that uses the Windows Firewall and a proxy configuration to prevent access to external IP addresses. Please see, Restrict IP Address Range on Windows PC and How to Remove Bing Chat Button from Edge Sidebar..

This method ensures security across Windows-based devices and minimizes potential gaps in network restrictions.

Also, see How to Fix Microsoft Edge Not Responding on Windows 11, Remove clickable icons from the Edge browser, and how to Reload all Microsoft Edge Browser Tabs, How to Perform a Reverse Image Search on Your Browsers,

Why Block IP Addresses?

Blocking IP addresses is useful for several reasons, including how to block IP addresses using Group Policy.

  • Restricting Internet Access: Sometimes, you may want to block internet access on specific devices or for particular users.
  • Enhanced Security: Prevent unauthorized traffic from reaching external networks by restricting IP ranges.
  • Traffic Control: Simplify network management by controlling traffic flow to and from your internal network.

This setup has been tested on Windows 7 and Windows 10, but it should work well across various Windows versions.

Setting Up IP Blocking with Windows Firewall

To create a policy that effectively blocks external IP addresses, we’ll use the Windows Firewall with Advanced Security settings through Group Policy to demonstrate how the GPO can be configured.

Step 1: Create a New Group Policy Object (GPO)

Launch the GPMC on your domain controller.

How to Block IP Addresses Using Group Policy (GPO) in Active Directory: Launch group policy management console
Launch group policy management console

Right-click the Organizational Unit (OU) where you want the policy applied and select Create a GPO in this domain, and Link it here.

How to Block IP Addresses Using Group Policy (GPO) in Active Directory: Create a new GPO
Create a new GPO

Give it a meaningful name, such as “Block External IPs” for easy identification.

How to Block IP Addresses Using Group Policy (GPO) in Active Directory: Enter GPO name
Enter GPO name

Step 2: Set Up the Windows Firewall Block Rules

Right-click on your new GPO and select Edit. This is a critical step in how to block IP addresses using Group Policy (GPO) in Active Directory.

How to Block IP Addresses Using Group Policy (GPO) in Active Directory: Edit GPO
Edit GPO

Go to Computer Configuration > Policies > Windows Settings > Security Settings > Windows Firewall with Advanced Security.

How to Block IP Addresses Using Group Policy (GPO) in Active Directory: Select Windows Firewall with Advanced Security
Select Windows Firewall with Advanced Security

Right-click on Outbound Rules and select New Rule.

Create new outbound rule
Create new outbound rule

Choose Custom as the rule type and click Next.

Select custom rule
Select custom rule

Leave the default All Programs selected and click Next.

Choose all programs
Choose all programs

Leave the protocol setting at Any and click Next.

Leave the default option
Leave the default option

On the Which remote IP addresses does this rule apply to? screen, select These IP addresses.

List IP Addresses
List IP Addresses

Click Add, then choose This IP address range.

Enter IP address range
Enter IP address range

Enter the IP range you want to block one at a time. For example, these ranges cover external, non-private IPs:

  • 0.0.0.1 – 9.255.255.255
  • 11.0.0.0 – 126.255.255.255
  • 128.0.0.0 – 169.253.255.255
  • 169.255.0.0 – 172.15.255.255
  • 172.32.0.0 – 192.167.255.255

Repeat this for each range until all are added and click Next.

Confirm IP addresses
Confirm IP addresses

Set the rule to Block the connection and click Next.

Block connection
Block connection

On the profile screen, you can leave all profiles checked (Domain, Private, and Public) and click Next.

Select all profile
Select all profile

Give this rule a descriptive name, like “Block External IPs” or “Internet Block Rule,” and click Finish.

Apply the settings
Apply the settings

Verifying the Configuration

After implementing the GPO to block IP addresses, test it to confirm that it’s working as expected. Restart a client machine in the target OU, then try to access an external IP. It should be blocked.

You can verify that the firewall is actively blocking traffic to external IP ranges by viewing the logs. Enable firewall logging if necessary through Windows Firewall with Advanced Security settings.

Conclusion

By following these steps, you can effectively restrict internet access and control network traffic through a well-structured Group Policy Object in Active Directory.

This setup uses the Windows Firewall for enhanced security, ensuring that users cannot easily bypass the blocks you’ve put in place.

I hope you find this post helpful on how to block IP addresses using Group Policy (GPO) in Active Directory. If you have any questions, feel free to leave them in the comment section below.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Network | Monitoring, Windows Server Tags:IP Address, Microsoft Windows

Post navigation

Previous Post: How to Create a User and Custom Domain in Entra ID
Next Post: How to create Microsoft 365 Account

Related Posts

  • FIX RDP Authentication Error
    Fix Remote Connection Issue: An Authentication Error Has Occurred with Code 0x80004005 Windows
  • windows update 03
    Check if Windows Updates were installed via the Registry Editor Windows
  • remote desktop connection tabs   rdp tabs
    Guide to Remote Desktop Connection Properties for Secure Access Windows
  • picture1 101
    Can’t Sign In: Domain Unavailable & 169.254 IP Address Issue Windows Server
  • ETWindows
    An Overview of Event Tracing for Windows Windows
  • banner 1
    How to Hide or Block Wi-Fi Networks on Windows Network | Monitoring

More Related Articles

FIX RDP Authentication Error Fix Remote Connection Issue: An Authentication Error Has Occurred with Code 0x80004005 Windows
windows update 03 Check if Windows Updates were installed via the Registry Editor Windows
remote desktop connection tabs   rdp tabs Guide to Remote Desktop Connection Properties for Secure Access Windows
picture1 101 Can’t Sign In: Domain Unavailable & 169.254 IP Address Issue Windows Server
ETWindows An Overview of Event Tracing for Windows Windows
banner 1 How to Hide or Block Wi-Fi Networks on Windows Network | Monitoring

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Spell Check Not Working in Microsoft Word
    How to Fix Spell Check Not Working in Microsoft Word Microsoft Exchange/Office/365
  • screenshot 2020 04 27 at 17.34.38
    Remote Server Administration Tools: Install RSAT on Windows Windows Server
  • We cannot fine camera
    Fix we could not find a camera compatible with Windows Hello Face Windows
  • SSD Trim and Disable delete operaion from ending up in Recycle bin
    SSD TRIM: Delete files permanently without using the Recycle Bin Windows
  • Screenshot 2024 02 09 at 1.06.54 PM
    Programmatically Deploying App Service Resources in Azure AWS/Azure/OpenShift
  • 517443 637286201540125528 16x9 1
    User account and process management in Linux Linux
  • TeamPass Password manager
    Install and configure TeamPass Password Manager Password Manager
  • windows admin center banner 825x400 1
    Fix failed to create new Scheduled Task RemoteException Windows Server

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.