I've been trying to setup Launchd to block several websites on osX 10.12.2 from 9AM - 3PM Monday-Friday
I set up
cp /etc/hosts_BLOCKED_sites.txt /etc/hosts
Launchd seems to be copying the file correctly.
$ ls -la /etc/hosts -rw-r--r-- 1 root wheel 715 Jan 10 15:01 /etc/hosts
$ sudo cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost # Blocked sites redirected to 0.0.0.0 0.0.0.0 reddit.com 0.0.0.0 www.reddit.com 0.0.0.0 facebook.com 0.0.0.0 www.facebook.com
However, I can still open the blocked sites after the
/etc/hosts are set to block access.
Any suggestions about why
/etc/hosts isn't blocking access to the sites?
Things I have attempted but have failed to block sites on Chrome:
sudo killall -HUP mDNSResponderfrom the command line
- I attempted to flush the Chrome DNS cache via
- I attempted to flush the Chrome Sockets
- I switched the hosts file to redirect sites to 127.0.0.1 , it did not block the site and I was told it's faster to redirect to 0.0.0.0
This did not make a difference. All the blocked sites are still accessible via Chrome v55.0.2883.95.