echo 0.0.0.0 facebook.com >> /etc/hosts
is a pretty simple solution to prevent facebook.com and its subsites from resolving to an IP address.
(This is also how Linux Mint's Mint Nanny works).
I would like to extend this to all sites except for a select few, however, I can't seem to find any workable solution on the web.
I have found some clues suggesting using a transparent proxy server, however I can't seem to be able to get it to work.
Can anyone post a concrete, straightforward recipe on how to achieve this simple goal (in an Unix-like operating system, preferably a GNU/Linux)?