Jens Holze wrote:
Hi!
I've been using dnsmasq for some time at home and at work but there's
one thing I recently tried and wondered whether it is possible at all.
dnsmasq can resolve any host it has served with an ip via dhcp. But
can I even have hosts resolved that have a static ip and don't use
dhcp? I have one host (it's a virtual server) in my /etc/hosts with
static ip (dhcp is not usable because the virtual relies on the hard
ip) but it is not resolved by dnsmasq. And I don't want to setup bind
for this. Could I add the server to the leases file manually (very
dirty I know)?
What do I have to do?
Just leave it in /etc/hosts on the server.
Dnsmasq reads /etc/hosts and serves the addresses it
finds there over DNS.
Since you say that it's already in /etc/hosts (presumably on all your
machines) you should find it's already resolvable by DNS: you can just
throw away the hosts entries everywhere except on the server running
dnsmasq.
Cheers,
Simon.