Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
1  
what are you using for a DNS server on the UNIX box? BIND? dnsmasq? djbdns? –  gravyface Feb 16 '12 at 19:28
1  
Since it MacOSX, the answer is probably bind. –  Zoredache Feb 16 '12 at 19:39
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.