uBlock Origin deployment via Active Directory Group Policy for Chrome, Microsoft Edge and Mozilla Firefox; with custom settings and whitelists.
My notes are for badware/malware blocking only, with the adblocking features de-selected. If you want to keep that functionality in your deployment, be sure to adjust the options as necessary.
Make sure you have the GPO templates installed for these browsers, first.
Generate the settings to deploy.
json
{
"selectedFilterLists": [
"ublock-badware",
"ublock-abuse",
"urlhaus-1",
"spam404-0"
]
}
json
{"selectedFilterLists":["ublock-badware","ublock-abuse","urlhaus-1","spam404-0"]}
The registry key below is what will deploy the customizations for uBlock Origin to the Windows machines.
Create a GPO and begin setup:
Update
HKLM
SOFTWARE\Policies\Google\Chrome\3rdparty\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\policy
adminSettings
REG_SZ
{"selectedFilterLists":["ublock-badware","ublock-abuse","urlhaus-1","spam404-0"]}
The following will force deploy uBlock Origin to Chrome installations.
Enabled
text
cjpalhdlnbpafiamejdnhcphjbkeiagm = uBlock Origin
cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx
^ The string is the identifier from uBlock origin. The URL is the store location to install/update the extension.
Since this browser is force-installed on Windows, it’s worth deploying uBlock to, also. Though I did not do a custom filter list; if you wanted to, you could follow the Chrome instructions but use the Microsoft Edge registry paths, instead.
The following will force install uBlock Origin to Edge, with default settings.
Enabled
text
odfafepnkmbhccpbejgmiehpchacaeak = uBlock Origin
text
odfafepnkmbhccpbejgmiehpchacaeak;https://edge.microsoft.com/extensionwebstorebase/v1/crx
Firefox's setup is a little different as it requires a local json file for custom lists.
Unlike Chrome, when you use gorhill's generator, you'll use the JSON-encoded settings to be used for adminSettings as a JSON string value output.
uBlockOriginConfig.json
and save it to C:\Windows\SYSVOL\domain\Scripts
to be distributed to all domain controllers via Active Directory; with the following content:
json
{
"name": "uBlock0@raymondhill.net",
"description": "ignored",
"type": "storage",
"data": {
"adminSettings": "{\"selectedFilterLists\":[\"ublock-badware\",\"ublock-abuse\",\"urlhaus-1\",\"spam404-0\"]}"
}
}
ProgramData
directory
Update
\\example.com\NETLOGON\uBlockOriginConfig.json
C:\ProgramData\uBlockOrigin\uBlockOriginConfig.json
Update
HKLM
SOFTWARE\Mozilla\ManagedStorage\uBlock0@raymondhill.net
REG_SZ
C:\ProgramData\uBlockOrigin\uBlockOriginConfig.json
Enabled
https://addons.mozilla.org/firefox/downloads/latest/EXTENSION-SHORT-NAME-HERE/latest.xpi
### See if the extension auto-installs
Go to about:profiles
> Create a new profile and launch in a new window > check for uBlock Origin and troll its settings
about:policies
also lists policy details some details about enterprise options applied