View previous topic :: View next topic |
Author |
Message |
neocui Apprentice
Joined: 21 Apr 2003 Posts: 186
|
Posted: Thu Dec 14, 2006 9:27 am Post subject: dnsmasq, local name resolution on the router itself? |
|
|
dnsmasq has this amazing ability to resolve names for machines on the local lan. For example, if host foo makes a dns request to dnsmask, then dnsmask will resolve foo to the assigned address for the rest of the LAN. It works everywhere except on the server itself. Is there a workaround for this? |
|
Back to top |
|
|
neocui Apprentice
Joined: 21 Apr 2003 Posts: 186
|
Posted: Thu Dec 14, 2006 9:48 am Post subject: |
|
|
read the dnsmasq doc. This is not possible, since dnsmasq gets the upstream servers from /etc/resolv.conf and it itself isn't in there.
The only way around this is to put 127.0.0.1 into /etc/resolv.conf and manually give dnsmasq the upstream server addresses, which is really inconvenient for PPP users.
So the another solution is to assign a static address to machine foo and put it in the /etc/hosts on the router. Add dhcp-host=foo to dnsmasq options to assign the static IP to that machine. This way, on the router machine, /etc/hosts is used instead to resolve that name, and dnsmasq passes it on to the rest of the network. The only downside is, the address has to be static.
It seems this all can be fixed by having dnsmasq automatically append entries to /etc/hosts for every dynamic address it assigns. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|