Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Hosts file not doing its job

Options
  • 19-02-2007 2:24am
    #1
    Closed Accounts Posts: 68 ✭✭


    So here is exactly what is in my hosts file, located in c:\windows\system32\drivers\etc :
    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    
    127.0.0.1    localhost
    127.0.0.1   *.adbrite.com
    127.0.0.1   http://adbrite.com
    127.0.0.1   http://ads.adbrite.com
    127.0.0.1   ads.adbrite.com
    127.0.0.1   *.cpxinteractive.com
    127.0.0.1   http://www.partypoker.com
    127.0.0.1   *.partypoker.com
    127.0.0.1   partypoker.com
    127.0.0.1   www.partypoker.com
    

    I can still access partypoker.com, adbrite.com etc.
    Am I doing everything right?
    The file is saved and closed, browser restarted etc.


Comments

  • Registered Users Posts: 81,223 ✭✭✭✭biko


    Try changing 127... to another IP address, not 123.456.78.9
    Maybe 10.0.0.1
    Does this work?


  • Registered Users Posts: 8,776 ✭✭✭SeanW


    Try sending requests to a properly formed but nonsensical IP address, like 127.0.0.4


  • Closed Accounts Posts: 68 ✭✭nupplenits


    No luck. Tried the ip addresses you mentioned and also 192.168.0.1


  • Registered Users Posts: 2,720 ✭✭✭niallb


    nupplenits wrote:
    So here is exactly what is in my hosts file, located in c:\windows\system32\drivers\etc :
    # Copyright (c) 1993-1999 Microsoft Corp.
    
    127.0.0.1    localhost
    127.0.0.1   *.adbrite.com
    127.0.0.1   http://adbrite.com
    127.0.0.1   http://ads.adbrite.com
    127.0.0.1   ads.adbrite.com
    127.0.0.1   *.cpxinteractive.com
    127.0.0.1   http://www.partypoker.com
    127.0.0.1   *.partypoker.com
    127.0.0.1   partypoker.com
    127.0.0.1   www.partypoker.com
    

    I can still access partypoker.com, adbrite.com etc.
    Am I doing everything right?

    No. Some of the lines are incorrect :-(
    Your hosts file is just a simple lookup table.
    No room for '*'s or 'http://'s

    Start again with something like
    127.0.0.1    localhost
    127.0.0.1   ads.adbrite.com
    127.0.0.1   adbrite.com
    127.0.0.1   www.adbrite.com
    127.0.0.1   partypoker.com
    127.0.0.1   www.partypoker.com
    

    Don't go setting other IP addresses in here unless you've a good reason.

    10.0.0.1 is an address which is very unlikely to be relevant to you.
    It is a LAN only address normally, and particularly if you use a
    3G internet package, may cause unexpected grief.

    127.0.0.1 represents your own machine, which is why what you are
    trying to do is often a good idea. Giving it a wrong address will just cause delay.

    127.0.0.4 depending on your setup will not be nonsensical, but may
    also resolve to your own machine.

    None of the hosts stuff will work if your browser is using a proxy,
    so that might be worth checking as well.

    Hope those few points help.
    Keep it simple!

    Good luck,
    NiallB


  • Closed Accounts Posts: 68 ✭✭nupplenits


    Thanks NiallB that did the trick.. no *'s or http://'s required


  • Advertisement
  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 90,838 Mod ✭✭✭✭Capt'n Midnight


    if you want something like hosts on steroids have a look at
    www.schooner.com/~loverso/no-ads/noproxy

    just a text file - no programs but it will accept wildcards


  • Moderators, Technology & Internet Moderators, Regional South East Moderators Posts: 28,470 Mod ✭✭✭✭Cabaal


    you can't user alias cards such as * in the host file


  • Closed Accounts Posts: 1,587 ✭✭✭hshortt


    You can't prevent the user using the IP adress of the site this way. It may be better to lock down the browser.

    Internet Options | Content | Content Advisor | Enable | Approved /Disproved Sites.

    Or a net nanny type of program? Of course they could try a different browser, but you can also prevent that.

    Local Policy is good for most of this stuff.

    cheerio
    Howard


Advertisement