hostname resolution ip DNS help????

Discussion in 'Mac Help/Tips' started by railthinner, Jan 7, 2003.

  1. railthinner macrumors regular

    Jul 1, 2002
    when I try to access part of our website which is hosted internally the domain name does not resolve and it doesn't even work when I type in the IP address because apparently there is some code on the that calls for the server name so it never gets further than loading the page title.

    Things work fine from the outside by the way.

    My IT guy tells me there should be some equivalent on my MAC (OSX) to the hostname file on Windows which I can edit so that server name always resolves to the IP. This is what he does on the local pcs so it works. If I recall properly (reaching now) as well, Windows got this from UNIX--so it seems OSX would have a configurable host file but I can't find it. I do think though that I found the OS9, but that does me no good.

    Any advice anyone?

    much thanks in advance.
  2. railthinner thread starter macrumors regular

    Jul 1, 2002
    a solution

    judging by the number of views of this post no one seems particularly interested, but just in case.....down the road. A solution to my problem:

    I downloaded a great utility from called hostal. It allows you to block or map IP addresses via your host file. This bypasses any DNS difficulties.

    Alternatively you can log in as root and open /etc/hosts and edit it; simple entering the IP followed be space and domain name.

    I spent far too long figuring this out, but you learn something new every day.

  3. Nipsy macrumors 65816


    Jan 19, 2002
    The 'approved' way of doing it is using NetInfo manager, in your Utilities folder.

    It has a section called 'machines' in which you can add all the machine/ip pairs you want to.

    You should also change the lookup order via this tutorial:

    The reason to do things this way, it that OSX is changing alot, and when updates are made, 3rd party & command line changes often get rewritten by the Apple installer. anything you do via NetInfo should be spared.
  4. gbojim macrumors 6502

    Jan 30, 2002
    The name of the file you are looking for is hosts as opposed to hostname. BTW, your IT guy gave you some bad info because the file is named hosts on Windows as well.

    It is located in the /etc directory.

    Edit the file using a text editor and add the line your IT guy adds to the Windows file - they both use the same format since it is part of the IP spec.
  5. railthinner thread starter macrumors regular

    Jul 1, 2002
    Yes, now I see what your referring to in NetInfo Manager. I had looked at that before but was a little puzzled. The shareware I downloaded only changed my hosts file, which I now realize how to do manually, so it's a bit unecessary.

Share This Page