I was looking for a simple and effective way to block websites and I really like this simple soultion.
The problem is, you can block facebook with this modification:
0.0.0.1 facebook.com
0.0.0.1 www.facebook.com
but users can still access facebook by going to fr-fr.facebook.com
or other prefix+website combinations.
My question is, is there any way to include all possible prefixes? Virtually speaking, some patterns like *.facebook.com
/etc/hosts
way is quite hacky (also because you need superuser privileges for it) but I think you could append0.0.0.0 *.facebook.com
to the file and that would work. See here for a full list of Facebook domains. – grooveplex Jul 13 '16 at 10:53