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

On system start, /var/run/dnsmasq/resolv.conf file ends up being blank. I had expected the resolvconf package to update it with the info from /etc/network/interfaces (dns-nameservers, dns-search).

I'm running a Ubuntu 10.04.2 LTS lucid server. I have both resolvconf and dnsmasq installed.

Here's the interfaces file section for eth0 (changed ip and dns names):

auto eth0
iface eth0 inet static

If I run ifdown eth0 && ifup eth0 after start up, then the /var/run/dnsmasq/resolv.conf file is correctly populated.

share|improve this question

I hate this. I found the same problem on my system. Part of the problem I think is NetworkManager (NetworkMangler).

I did the following

echo "nameserver" > /etc/resolv.conf
echo "nameserver" >> /etc/resolv.conf
chattr +i /etc/resolv.conf

Now nothing can change it but me. Doesn't solve the root problem, but certainly worked.

N.B. You can replace /etc/resolv.conf with /var/run/dnsmasq/resolv.conf

Set it, and forget it. On servers, I don't approve of services fiddling with my config. Especially if I've set up a static IP.

I wanna be in control, damnit.

share|improve this answer
Thanks for the idea, I'm sure this would work. I don't use NetworkManager on this server. It does seem like possibly resolvconf is initializing before the networking side is up. i'd prefer to keep the system configuration as automatic as possible, but if I can't figure out how to fix the issue, I will go along with hard coding the info in the config files. – MrSunday Aug 15 '11 at 12:48

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.