How to force Firefox to respect my modified MVPS hosts file ?

Discussion in 'other software & services' started by Fly, Jul 4, 2015.

  1. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    I'm running Firefox on a WIndows XP box.

    I want Firefox to respect my modified MVPS HOSTS file. And not to connect to google analytics, facebook, etc. Which it appears to do, judging by what I see on my screen.

    Does anyone know how this can be done, preferably without using add-ons ?

    Another issue: I have not installed a Flash version for Firefox. The only Flash versions I have are for IE 7 and Opera. For whatever reason, Flash lowers the security/privacy settings of Flash. Is there a way to force Firefox to respect my Flash settings ?
    I keep an older version of Flash, since newer versions have a (formal) memory requirement that my machine doesn't match.

    Thanks.
     
    Last edited: Jul 4, 2015
  2. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,689
    Location:
    USA
    ^@Fly,

    You do not need to force Firefox to use your custom hosts file. If you have a custom Hosts file, Firefox has no choice but to go through it. In fact the decision is not in Firefox's hands, your OS will force Firefox to use the Hosts file.

    Sometimes it takes up to a day for the new hosts file to fully take effect, if you want immediate results flush your DNS cache when you change your host file.
     
  3. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    Then why do I see it connecting to google analytics ?

    I think I flushed Firefox's cache by setting the relvant value to zero. But truly, I'm not familiar with Firefox at all.
     
  4. Minimalist

    Minimalist Registered Member

    Joined:
    Jan 6, 2014
    Posts:
    14,883
    Location:
    Slovenia, EU
    You should flush DNS cache also. Run CMD elevated and run this command:

    Code:
    ipconfig /flushdns
     
  5. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    I don't know as much as I used to about these matters !

    That command doesn't work, and I know it has something to do with my router. I can make a wired connection, but would that do any good ?
     
  6. Minimalist

    Minimalist Registered Member

    Joined:
    Jan 6, 2014
    Posts:
    14,883
    Location:
    Slovenia, EU
    No it doesn't matter how you connect to internet. HOSTS file is used by OS to resolve domain names before it checks them on remote DNS resolvers (whichever you use).
    Could you please post HOSTS file rules that should block connections and connections that you see on your screen?
     
  7. Pliskin

    Pliskin Registered Member

    Joined:
    Feb 8, 2009
    Posts:
    440
    Does your hosts file work at all, because my didn't few months ago? Only OS reinstall helped me.
     
  8. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    I see no reason to suspect that anything is wrong with the HOSTS file. This is a recently restored image, running some security software.

    I still have an older MVPS HOSTS file, I didn't go through the trouble to update it. It's not that important, except for a few sites that I want to block.

    A few my 'own' rules:
    '127.0.0.1 google-analytics.com
    127.0.0.1 www.google-analytics.com
    127.0.0.1 ssl.google-analytics.com
    127.0.0.1 www.facebook.com
    127.0.0.1 facebook.com
    127.0.0.1 facebook.net
    127.0.0.1 static.ak.fbcdn.net
    127.0.0.1 www.static.ak.fbcdn.net
    127.0.0.1 login.facebook.com
    127.0.0.1 www.login.facebook.com
    127.0.0.1 fbcdn.net
    127.0.0.1 www.fbcdn.net
    127.0.0.1 fbcdn.com
    127.0.0.1 www.fbcdn.com
    127.0.0.1 static.ak.connect.facebook.com
    127.0.0.1 www.static.ak.connect.facebook.com
    127.0.0.1 apps.facebook.com'

    That should block google analytics and facebook, although it is possible that I should add more lines for what those companies are running these days.
     
  9. Infected

    Infected Registered Member

    Joined:
    Feb 9, 2015
    Posts:
    1,136
    You should try 0.0.0.0 instead of 127.0.0.1.
     
  10. JDackNo

    JDackNo Registered Member

    Joined:
    Oct 27, 2014
    Posts:
    13
    Location:
    FRANCE
    Did you check the path in this key :
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath

    It must be the real path of your Hosts file:)
     
  11. SpousalMilk

    SpousalMilk Registered Member

    Joined:
    Jun 24, 2012
    Posts:
    48
    Location:
    USA
    Make sure the hosts file has no extension on it. All windows installations default to hide known file extensions, which I think is plain dumb, so if you created the hosts file manually in notepad and saved it it would hide the file extension .txt and make it look like "hosts," albeit with a text document icon.
     
  12. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,689
    Location:
    USA
    If you have blocked google analytics with a Hosts file, Firefox will still try to connect with google analytics, but google analytics will not load. Having a hosts file does not mean that the browser will not try to connect to that address. The browser will try to connect but nothing will load.

    If you do not want to manually change hosts file. Might I recommend Hosts Switcher. A simple utility that allows you to change between multiple hosts files with one click. It takes user error out of the equation.

    But if you are really only interested in blocking the tracking sites from tracking your online browsing. Might I recommend an add-on for Firefox called Ghostery. It is very highly rated. It not only shows you which trackers are running on each webpage, but also gives you the ability to selectively choose which trackers you want to block or it can block all of them if you configure it to do so. You no longer need a hosts file if you have Ghostery installed, but it can work along side a hosts file too if that is what you want.
     
  13. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    That's the 'new way', isn't it ? I honestly don't know why I would change it. Other than following 'convention'.
     
  14. Fly

    Fly Registered Member

    Joined:
    Nov 1, 2007
    Posts:
    2,201
    Raza0007,

    Maybe you are right. Maybe it just looks like Firefox does that. It seems to last shorter since I did something with the DNS cache. (expiration? not sure)

    I'm sorry, I don't have Firefox available right now but I wonder if that didn't do something either. I recall reading some stories about people having issues with Firefox and the HOSTS file.

    I'm still wary of the program. Why can't I use Opera 12, or IE 7 ? That newer junk isn't always better, and *real* choices for WIN XP are limited. Yes, I know why. But I don't like it ! It probably won't be long before that machine will be permanently disconnected from the internet. Much of it is just too old for the modern stuff. Especially with 512 MB RAM ... don't tell me ...
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.