Blocking sites using /etc/hosts

3

1

To fight against my procrastination I changed /etc/hosts on my Ubuntu (11.10) laptop. The /etc/hosts looks now like

127.0.0.1 facebook.com  
127.0.0.1 plus.google.com  
127.0.0.1 twitter.com  

and many more time-eaters in it!

But if I type now facebook.com in my browser it still works.

Is there a DNS cache or something?

Joerg

Posted 2012-02-18T13:24:20.000

Reputation: 143

By the way, you can put multiple entries on one line--127.0.0.1 facebook.com plus.google.com twitter.com stackoverflow.com etc. – Chris Morgan – 2012-02-18T13:39:00.527

Answers

3

Are you perhaps going to www.facebook.com rather than facebook.com? You probably want to block www. variants as well.

Chris Morgan

Posted 2012-02-18T13:24:20.000

Reputation: 251

such an easy answer... i was searching really long for deleting the dns cache... thanks for your help! – None – 2012-02-18T13:58:46.223