Skip to main content
Question

Block URL on Chrome

  • April 18, 2018
  • 4 replies
  • 27 views

Forum|alt.badge.img+1

I am working on add URLs on Deny URLs under Parental Controls in the Configuration Profiles. It worked pretty well on Safari, however, our students are still able to access to sites that are placed on Deny URLs on Google Chrome. Students have to use Google Chrome due to Google Classroom. Is there any way can we block sites that are on the list under Deny URLs. I am wondered if Chromium is the best answer?

4 replies

A_Collins
Forum|alt.badge.img+11
  • Contributor
  • April 19, 2018

You can modify /etc/hosts file
That blocks address regardless of the browser.

!/bin/bash

echo "127.0.0.1 www.facebook.com" >> /etc/hosts

or just execute command below
echo "127.0.0.1 www.facebook.com" >> /etc/hosts


Forum|alt.badge.img+3
  • New Contributor
  • October 11, 2019

Hi,

I have made a script based on the following:

!/bin/sh

sudo nano -e /etc/hosts
127.0.0.1 web.whatsapp.com
127.0.0.1 www.facebook.com
sudo dscacheutil -flushcache
exit 0

However, when i create a policy and upload this .sh file; the page keeps loading. I'm not sure if there is anything wrong in the script. I'm planning to roll out this policy to students' Macbook. Would appreciate if you can help me out.

Thanks.


Forum|alt.badge.img+7

You could just block the access at the network level and save yourself a lot of hassle (aside from the inevitable complaints from teachers).


pete_c
Forum|alt.badge.img+16
  • Honored Contributor
  • October 11, 2019

Without any sort of network-level content filtering, you should deploy a managed profile for Google Chrome, which along with with blacklisting URLs also would give you enforcement over Safe Browsing, default managed bookmarks, white/blacklist specific Extensions.

https://cloud.google.com/docs/chrome-enterprise/policies/?policy=URLBlacklist