Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

All machines on local LAN are working fine and using a UNIX box as their gateway and primary nameserver. DNS works great for the local domains the server manages and it forwards requests for domains it doesn't up to the ISP's namesevers. great!

Now, I'd like to change the hostname for a single host (not managed) to point to a different (local) IP for the machines on the LAN. How/where does one set that up? etc/hosts on the gateway? or are there some other files because it's acting as a nameserver?

share|improve this question
what are you using for a DNS server on the UNIX box? BIND? dnsmasq? djbdns? – gravyface Feb 16 '12 at 19:28
Since it MacOSX, the answer is probably bind. – Zoredache Feb 16 '12 at 19:39

The hosts file is for the DNS client component, even on a DNS server. Entries in the hosts file on the DNS server will be used by the DNS client component on the server, not by the DNS server component. you need to add/create the A record for the host in question in the appropriate DNS zone on the server.

share|improve this answer
Believe dnsmasq will use the /etc/hosts file by default when responding to queries. – gravyface Feb 16 '12 at 19:34
Oh, my bad then. I'm a Windows admin exclusively. I should have paid more attention to the word UNIX in the question. – joeqwerty Feb 16 '12 at 19:37

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.