Skip to content

Instantly share code, notes, and snippets.

@pohlt
Last active February 13, 2023 08:11
Show Gist options
  • Save pohlt/c7afc06aecd858ab222b23699a011c6f to your computer and use it in GitHub Desktop.
Save pohlt/c7afc06aecd858ab222b23699a011c6f to your computer and use it in GitHub Desktop.
Chrome policies to block / allow URLs

Chrome Policies to Block / Allow URLs

Recourses:

Installation

  1. Create the following folders:
    /etc/opt/chrome/policies/managed
    /etc/opt/chrome/policies/recommended   
    
  2. Create the file /etc/opt/chrome/policies/managed/settings.json containing
    { 
      "URLBlocklist": [
        "*"
      ],
    
      "URLAllowlist":  [
        "chrome://settings",
        "chrome://os-settings",
        "chrome-untrusted://",
        "chrome://policy",
        "https://google.com",
        "https://google.de",
        ".new-tab-page",
        "chrome://resources",
        "chrome://theme",
        "chrome://favicon2",
        "https://wikipedia.org",
        "https://homeworker.li",
        "https://mebis.bayern.de",
      ]
    }
    
  3. Make sure that the files a owned by root and cannot be altered by users (644).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment