Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm setting up virtual dev environments and I want the hostname.domain to be something specific, eg- "barney.local". However my /etc/resolv.conf file keeps getting nuked because i'm using DHCP. I placed this into my dhclient.conf:

supersede domain-name "localhost"
supersede host-name "barney"

.. but it didn't help. I'm not sure where I'm going wrong. How can I still use DHCP but configure that virtual environment to see itself as barney.local?

fyi i'm running debian squeeze

share|improve this question
add comment

migrated from stackoverflow.com May 31 '11 at 14:55

This question came from our site for professional and enthusiast programmers.

1 Answer

If you are running debian squeeze, you have an automated option when you install bind9 from repository to resolve with bind instead of using the DNS provided by DHCP.

Then you can add you own TLD (like .local) in bind to resolve them.

You'll find the configuration of dhclient in /etc/dhcp3/ . But are you sure that the problem is comming from the resolv configuration and not from your DNS server ?

nslookup can help you to figure out that. Without more informations, I cannot know where the problem comes from, so cannot be more specific than pointing you some directions.

share|improve this answer
add comment

Your Answer

 
discard

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