Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried to block some hosts to load from them ads and scripts. for example in /etc/hosts:

127.0.0.1 web-visor.com
0.0.0.0   c1.web-visor.com

Why after editing and saving the file, firefox (after restart) still load this sites (not from cache of course)?

My /etc/host.conf seems to search previously in hosts file

order hosts,bind
multi on

What's wrong?

share|improve this question

migrated from stackoverflow.com Nov 20 '10 at 17:14

This question came from our site for professional and enthusiast programmers.

2 Answers 2

host.conf is obsolete, look in nsswitch.conf .

share|improve this answer
    
Do you know how to use it instead of /etc/hosts? Because the manual doesn't seem to give even a little hint, and I couldn't find an examples about that. /etc/hosts can't supposed to be obsolete until the new one can execute it's functions. From manual I am doubt that it is. –  Hi-Angel Sep 30 '14 at 13:56
1  
/etc/host.conf is obsolete, /etc/hosts isn't. nsswitch.conf decides whether and how /etc/hosts is used. –  Tobu Oct 1 '14 at 13:28

Does your Firefox use proxy? /etc/hosts SHOULD effect your Firefox (I tested it). What is the result of pinging those addresses?

share|improve this answer
    
How did you test this? In my experience, a proxy overrides /etc/hosts. –  SabreWolfy Feb 28 '13 at 11:16
    
If you turn on the feature that intranet addresses should not use proxy, then /etc/hosts should no be overridden by the proxy (technically it is not an override, the domain you try to reach will be sent to the proxy, and the proxy will re-resolve it by its own DNS which will return a correct IP). –  karatedog Feb 28 '13 at 15:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.