[Dnsmasq-discuss] setting up dynamic DNS?
Jan 'RedBully' Seiffert
redbully at cc.fh-luh.de
Mon Sep 10 16:45:33 BST 2007
Adam Hardy wrote:
> Thanks for the responses, I've just tried again, but didn't succeed. I
> get 'name or service unknown' response from ssh, ping etc.
Hmmm, on which machine? Isengard?
> I put in the "send host-name" option, as well as explicitly defining the
> defaults for dhcp-option 1, 3 and 6.
And on your clients?
Do they get an IP over dhcp?
Is their DNS-Server set to isengard? (view in /etc/resolv.conf)
Is their default gateway set to isengard? (route -n should say so)
What's printed to isengards system logs when a client gets an IP?
> Presumably if dnsmasq is meant to resolve/name-serve my clients, it will
> put their hostnames in isengard's /etc/resolv.conf?
No, hosts name <-> IP associations are generally not saved in
/etc/resolv.conf, the IP addresses of the machines DNS servers are
stored there (in your case, your ISP DNS server).
Dnsmasq saves dynamically generated associations in its lease file
You can have static associations in /etc/hosts.
dnsmasq will read all three files unless otherwise configured:
/etc/resolv.conf - to get the upstream DNS server
/etc/hosts - to serve static host name <-> IP assignments you made
the lease file - to serve entries generated from leases after a restart
> I am probably totally wide of the mark here, but isn't dhclient3
> constantly rewriting /etc/resolv.conf on isengard (gateway / dnsmasq
> server) to set up eth2 on the internet?
If you are not using pppoe (or something similar) and are getting your
Internet-address by simply doing dhcp on the interface connected to the
modem, then yes. (normally scripts like adsl-connect also rewrite your
/etc/resolv.conf, as i said, i patched mine to stop this...)
But thats ok, this way /etc/resolv.conf will always contain "fresh"
entries of the upstream DNS servers.
Normally dnmasq will poll /etc/resolv.conf for changes, so it doesn't
miss when the upstream DNS server change.
This configuration is fine, but then you will not be able to query
dnsmasq from the machine isengard itself (or not easily), because the
system also uses /etc/resolv.conf to decide who to ask for hostname <->
IP, and your ISP servers will know nothing about your mappings.
The machines inside your LAN, if proper configured (look at their
/etc/resolv.conf, should be isengards IP), will query dnsmasq and should
To fix this on isengard, instruct dhcp-client not to overwrite
/etc/resolv.conf but instead to dump the resolv-info it gathered from
your ISP to another file.
Now you say dnsmasq to use this other file as resolv-file, and in the
system /etc/resolv.conf, you put 127.0.0.1 (on which dnsmasq should also
If this is possible with dhcp-client, i don't know, but it looks like
its very configurable.
> I am using the example dnsmasq.conf that came with the package, but I
> just parsed out the comments. And unlike Jan, I'm not using pppoe so I'm
> not sure what approach to take.
> Thanks and regards
Have you ever noticed that the Klingons are all speaking unix?
"Grep ls awk chmod." "Mknod ksh tar imap."
"Wall fsck yacc!" (that last is obviously a curse of some sort)
-- Gandalf Parker
More information about the Dnsmasq-discuss