How to block Internet access using Group Policy (GPO)
This article will show you how to block Internet access for users or computers in the Active Directory Group Policy Object. This feature has been tested on Windows 7, Windows 10 and it works great!
There are many tutorials detailing how to block access through implementing a non-existing proxy. This method will work for some things, but the problem is that not all software necessarily uses these settings to connect to the Internet, and does not necessarily prevent a specific user from using these settings. .
This guide recommends using Windows Firewall managed through Active Directory to block all additional Internet IP addresses, enforcing non-existent proxies.
Without doing both, proxies can exist on your network in private (permitted) IP ranges and thus have Internet activity. You can apply this group policy to individual users or entire organizational units, as appropriate, and it will work well on all devices.
Please note that with Windows Firewall, the order of rules does not really matter, Block actions will take precedence over Allow rules. Therefore, all non-private IP ranges must be blocked, or in other words, all IP addresses on the internet at large, without even specifying private RFC 1918 and RFC 5735 ranges.
Summary version
Create a Windows Firewall policy and specify these IP address ranges in the BLOCK rule:
- 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
- 192.169.0.0 - 198.17.255.255
- 198.20.0.0 - 255.255.255.254
Also creates a non-existing proxy and prevents users from changing this setting.
Windows Firewall GPO
Edit Group Policy as you normally would and select an appropriate object to apply the new policy to.
Give it a reasonable name and click OK.
And then in the right screen, edit the GPO you just created.
Next, navigate to Policies – Windows Settings – Security Settings – Windows Firewall with Advanced Security – Outbound Rules .
On the right panel, right-click and select 'New Rule…'.
In the pop-up box, select 'Custom Rule' and then click Next.
Leave the default option of 'All Programs' and click Next.
Leave the protocol default as 'Any' and click Next.
This next screen is where you will add the majority of your settings, in the 'Remote IP addresses' section select 'These IP addresses' and click 'Add'.
In the next pop-up window, you need to add some IP ranges, so click 'This IP Range' and enter the range 0.0.0.1 – 9.255.255.255 , like this:
You will have to repeat the two steps above to add the following IP ranges:
- 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
- 192.169.0.0 - 198.17.255.255
- 198.20.0.0 - 255.255.255.254
When you complete that list you will have a screen that looks like this, if you are satisfied click Next.
On the next screen, make sure the action is marked as 'Block' and click 'Next'.
In your profile, you may want to highlight all of these locations and then click 'Next'.
Give the rule a reasonable name and click 'Finish'.
Install Internet GPO
Next, you will need to set up a fake proxy. You may need to download the IE admin package first.
Navigate to User Configuration – Preferences – Control Panel Settings – Internet Settings and right click on the create new settings option in the right panel.
Then click Connections , then LAN Settings.
In the box that appears, check 'Use a proxy server for your LAN' and in the address box, enter '127.0.0.1' on port '3128' , like this:
Then click OK twice to return to the main GPO screen.
Next in the GPO, go to User Configuration – Administrative Templates – Windows Components – Internet Explorer .
On the right side, you need to find the option that says 'Disable changing connection settings' . When you see it, open it by double clicking on it.
Enable this setting and click OK.
Close all GPO windows and you're done!
You should read it
- Use Group Policy Filtering to create a NAP DHCP enforcement policy - Part 1
- How to reset Local Group Policy settings on Windows 10
- Block web browser with IPSec
- Control Wifi access using Group Policy
- 4 tips to open Local Group Policy Editor on Windows 8 / 8.1
- Install the printer using Group Policy Object
- How to apply Group Policy only to non-administrators in Windows 10
- Configure App-V with Group Policy Objects
May be interested
- Configure App-V with Group Policy Objectsgroup policy objects are increasingly used in centralized management of settings, especially for software products installed on many systems.
- Use Group Policy Filtering to create a DHCP enforcement policy for NAP - Part 2how to use the nap policy wizard to automatically create network, health, and connection policies to control your network.
- 10 important Windows Group Policy settings need to be done immediatelyconfigure the 10 group policy below carefully and enjoy better windows security for your computer.
- Steps to block others from adding to Telegram groupbeing added to the telegram group makes you very uncomfortable when you do not know the people in that chat group. so you should control who can add you to telegram groups.
- How to use Local Group Policy Editor to tweak your computerthis article will show you how to use local group policy editor to make computer changes.
- 11 tips to open Local Group Policy Editor on Windowson local group policy editor, you can set up deletion of notification history, set up account lock to limit the number of login times, etc. in the article below, tipsmake.com.com will introduce to you a several ways to open local group policy editor on windows.
- Cannot open Local Group Policy Editor, quick fixto change configuration and important windows policies, windows 11 users will use local group policy editor. in case you cannot open the local group policy editor, immediately refer to the information in tipsmake's article!
- Delete temporary Internet files with Group Policy Preferencesone way to improve the protection of your workstations and networks is to delete temporary internet files.
- How to install the Microsoft Edge Group Policy template on Windows 10on windows 10, you can download and install group policy templates to manage microsoft edge settings, and this guide will show you the process.
- How to block Internet access for a specific user accountthe easiest way to block a user's internet access is to set their proxy server settings to a non-existing proxy server and prevent them from changing the settings.