+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
Windows Thread, Local HOSTS file ignored on a domain in Technical; Hi there. At home I bypass adverts and popups online by making my hosts file divert those sites to 0.0.0.0. ...
  1. #1
    eejit's Avatar
    Join Date
    Jun 2005
    Location
    Ireland
    Posts
    606
    Thank Post
    52
    Thanked 12 Times in 12 Posts
    Rep Power
    22

    Local HOSTS file ignored on a domain

    Hi there.
    At home I bypass adverts and popups online by making my hosts file divert those sites to 0.0.0.0. It's a common trick which most of you probably use as well, but if you haven't heard of it before the details can be found here.

    I've tried to implement this in the school too, but it doesn't work. It looks like the hosts file is ignored when you join a domain. I presume it's because the DNS server takes a higher priority.

    Is there some way to incorporate the entries in my hosts file into DNS or somewhere else that will take account of them? There must be a way, but I can't find it.

  2. #2

    Dos_Box's Avatar
    Join Date
    Jun 2005
    Location
    Preston, Lancashire
    Posts
    9,787
    Thank Post
    572
    Thanked 2,154 Times in 982 Posts
    Blog Entries
    23
    Rep Power
    626

    Re: Local HOSTS file ignored on a domain

    What do you have running on your network, server\desktop OS, proxy, AD etc?

  3. #3
    eejit's Avatar
    Join Date
    Jun 2005
    Location
    Ireland
    Posts
    606
    Thank Post
    52
    Thanked 12 Times in 12 Posts
    Rep Power
    22

    Re: Local HOSTS file ignored on a domain

    Sorry, We have Windows 2003 servers with AD and XP clients. We have an ISA2004 box as a proxy/firewall and there's probably somewhere to do it in there if I could find it.

  4. #4
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,996
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: Local HOSTS file ignored on a domain

    I believe the order should be:
    Cache
    Host File
    DNS Server

    As you would expect. But I have seen a similar thread to this before on Mark Minasi's forum and people were finding this wasnt always the case.

  5. #5
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,996
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: Local HOSTS file ignored on a domain

    Just checked and what I said wasnt quite true. The subject I was thinking of was local name resolution where WINS plays a part as well.

  6. #6

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Local HOSTS file ignored on a domain

    The hosts file isn't checked when your using a proxy as the DNS resolution is done by the proxy rather than your local machine. If you wish to block stuff then the proxy is the correct place to do it anyway. ISA server isn't something I've used (Squid here) but I expect there is some way to add ad/cookie/etc blocking to it?

  7. #7
    eejit's Avatar
    Join Date
    Jun 2005
    Location
    Ireland
    Posts
    606
    Thank Post
    52
    Thanked 12 Times in 12 Posts
    Rep Power
    22

    Re: Local HOSTS file ignored on a domain

    Chris, even though you may have been looking for the wrong thing, what you posted above IS what I would expect. You would imagine that the machine would look locally first before querying the server, but doesn't appear to how it works.

  8. #8

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Local HOSTS file ignored on a domain

    nope, because thats not how proxy servers work. The browser looks up the proxies IP address and then passes the URL vertibam to the proxy server. Doing anything else would break far too many things, filtering for example.

  9. #9
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,996
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: Local HOSTS file ignored on a domain

    Geoff is right I just tried it.
    I added two entries to the hosts file

    192.168.0.1 www.google.co.uk
    192.168.0.1 www.yahoo.com

    P:\>ipconfig /flushdns

    Windows IP Configuration

    Successfully flushed the DNS Resolver Cache.

    P:\>ipconfig /displaydns

    Windows IP Configuration

    1.0.0.127.in-addr.arpa
    ----------------------------------------
    Record Name . . . . . : 1.0.0.127.in-addr.arpa.
    Record Type . . . . . : 12
    Time To Live . . . . : 529581
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    PTR Record . . . . . : localhost


    1.0.168.192.in-addr.arpa
    ----------------------------------------
    Record Name . . . . . : 1.0.168.192.in-addr.arpa.
    Record Type . . . . . : 12
    Time To Live . . . . : 529581
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    PTR Record . . . . . : www.google.co.uk


    Record Name . . . . . : 1.0.168.192.in-addr.arpa.
    Record Type . . . . . : 12
    Time To Live . . . . : 529581
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    PTR Record . . . . . : www.yahoo.com


    www.yahoo.com
    ----------------------------------------
    Record Name . . . . . : www.yahoo.com
    Record Type . . . . . : 1
    Time To Live . . . . : 529581
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 192.168.0.1


    www.google.co.uk
    ----------------------------------------
    Record Name . . . . . : www.google.co.uk
    Record Type . . . . . : 1
    Time To Live . . . . : 529581
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 192.168.0.1


    localhost
    ----------------------------------------
    Record Name . . . . . : localhost
    Record Type . . . . . : 1
    Time To Live . . . . : 529581
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 127.0.0.1
    When I try them both they bring up the websites they should do and not the IIS page from one of my servers.

  10. #10

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Local HOSTS file ignored on a domain

    Altering the hosts file on the ISA server is the lazy way to fix this.

  11. #11
    tarquel's Avatar
    Join Date
    Jun 2005
    Location
    Powys, Mid-Wales, UK
    Posts
    1,740
    Thank Post
    13
    Thanked 44 Times in 34 Posts
    Rep Power
    29

    Re: Local HOSTS file ignored on a domain

    Oddly, and a slight digression here, but I've never needed to touch the hosts file except to remove invalid/bad entries.

    I just have the vanilla one - and anything that Spybot or other Spyware programs plug in and thats that.

    No problems.

    Why do you use it then? Some fancy stuff I dont know no doubt lol

    Cheers,
    Nath

  12. #12
    StewartKnight's Avatar
    Join Date
    Jun 2005
    Posts
    1,587
    Thank Post
    2
    Thanked 27 Times in 21 Posts
    Rep Power
    30

    Re: Local HOSTS file ignored on a domain

    I think you're making this too difficult. The SP1 for 2003 server includes the ability to block pop-ups on the clients, which I've employed with no problem here. (and if I can do it, anyone can!)

    Stewart Knight
    Network Manager
    Appleby Grammar School

  13. #13
    tarquel's Avatar
    Join Date
    Jun 2005
    Location
    Powys, Mid-Wales, UK
    Posts
    1,740
    Thank Post
    13
    Thanked 44 Times in 34 Posts
    Rep Power
    29

    Re: Local HOSTS file ignored on a domain

    ...and for SP2 in XP (incase ya didnt know lol )

    Yep - it works well and with a bit o GP, you can lock it down to so they cant allow the pop-up window or turn the feature off, etc.

    Cheers,
    Nath

  14. #14
    StewartKnight's Avatar
    Join Date
    Jun 2005
    Posts
    1,587
    Thank Post
    2
    Thanked 27 Times in 21 Posts
    Rep Power
    30

    Re: Local HOSTS file ignored on a domain

    Just read on the the register that SP1 for 2003 will be out next month..... so what the hell have I got on my system!!!!



    Stewart Knight
    Network Manager
    Appleby Grammar School

  15. #15

    Join Date
    Jun 2005
    Location
    Elgin, Scotland
    Posts
    387
    Thank Post
    1
    Thanked 4 Times in 4 Posts
    Rep Power
    23

    Re: Local HOSTS file ignored on a domain

    Stewart, SP1 for 2003 is already out & you can download it from Microsoft, however it won't begin to be distributed via Automatic Updates until July 26th, or later if you opt to use the Download Blocker (like the one used for XP SP2).

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Web Hosts
    By thom in forum Recommended Suppliers
    Replies: 11
    Last Post: 19th October 2007, 09:28 AM
  2. Hosts file not working
    By Zoom7000 in forum Windows
    Replies: 7
    Last Post: 27th February 2007, 12:14 PM
  3. Linux File Server in Windows Domain...
    By Netman in forum *nix
    Replies: 2
    Last Post: 15th February 2007, 06:12 PM
  4. Replies: 12
    Last Post: 20th November 2006, 01:33 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •