[Tfug] Problems with local DNS using DD-WRT and dnsmasq

Zack Breckenridge zbrdge at gmail.com
Sat Sep 27 09:19:32 MST 2014


Just a stab in the dark:

Try changing the line:

local=/merseine.nu/

To:

domain=merseine.nu,192.168.1.0/24,local

Then uncomment your host-record lines and comment out your ptr-record
lines. And see what happens. Sorry if you've already tried this..

Also, can you tell us what version of of dnsmasq is shipped with this
dd-wrt firmware?

Zack B.
On Sep 26, 2014 9:06 PM, "John Gruenenfelder" <jetpackjohn at gmail.com> wrote:

> TFUG,
>
> Hello again.  I'm having some annoying problems with my current
> installation
> of DD-WRT when trying to set up local DNS resolution.  So far, I've asked
> first in the DD-WRT forum with no reply and then posted on StackExchange
> (superuser forum) again with no reply.  I hope somebody here is
> knowledgeable
> about DD-WRT and dnsmasq in particular.
>
> I can work around the problem on most of my machines by putting the correct
> entries in the /etc/hosts file, but that's not really an option for other
> machines like Android phones.  The other big issue is portability
> (physical,
> that is).  When an Android phone or a laptop is connected through the LAN,
> it
> needs to resolve the hostnames to internal IP addresses, but when it is
> connecting from the Internet (to the one host accessible that way) the same
> hostname needs to resolve to the external IP.  You can do this with local
> DNS
> resolution but not so much with static /etc/hosts entries.
>
> Anyway, here is my original forum posting with all the config info.  I
> really
> hope somebody here has some ideas because, so far, the Internet has been a
> big
> let down on this issue...  :(   Thanks!
>
> ----------------------------------------
>
> I just upgraded my ASUS RT-AC56U router to a newer DD-WRT, build 23940.
> This
> is the latest as provided by the website's router database even though it
> is
> from April 22, 2014. If a newer release contains a fix for the following
> DNS
> issues, I would install it, but I don't want to make that jump unless I
> know
> for sure that I need a newer build (that is, I'm trying to avoid beta
> builds).
>
> My configuration is simple enough, but I am having trouble getting my full
> DNS
> configuration working. My network setup:
>
>     Using subnet 192.168.1.0
>     Router at 192.168.1.1
>     Two machines with static IPs: 192.168.1.2 and .3
>     One static DHCP lease at: 192.168.1.5
>     All other wired and wifi clients are DHCP
>
> Using just the settings available in the admin GUI, with most everything
> set
> at the defaults, I get no local DNS resolution at all. DNS for the wider
> Internet does work. After searching around the Net and on both Stack
> Exchange
> and DD-WRT forums, I did find some helpful config advice. I have the
> following
> in the "Additional DNSMasq Options" box:
>
>     #####
>     # Additional dnsmasq config options
>     #####
>
>     local=/merseine.nu/
>     expand-hosts
>     domain-needed
>
>     ### DNS records - merseine.nu home network ###
>     #host-record=moongate.merseine.nu,moongate,192.168.1.1
>     #host-record=swordfish.merseine.nu,swordfish,192.168.1.2
>     #host-record=bebop.merseine.nu,bebop,192.168.1.3
>
>     ### DNS records (reverse lookup) - merseine.nu home network ###
>     ptr-record=1.1.168.192.in-addr.arpa,moongate.merseine.nu
>     ptr-record=2.1.168.192.in-addr.arpa,swordfish.merseine.nu
>     ptr-record=3.1.168.192.in-addr.arpa,bebop.merseine.nu
>
>     ### static DHCP records ###
>     dhcp-host=e8:03:9a:38:e4:90,192.168.1.5,redtail.merseine.nu,infinite
>
> With this setup, remote DNS functions, but I can do local resolution only
> on
> the "redtail" hostname. Notice that the host-record lines are commented
> out. If I uncomment them, DNSMasq no longer starts on the router and
> therefore
> all DNS is broken.
>
> If it helps, the remaining DNS/DNSMasq related settings in the GUI are:
>
>     Basic setup -> DHCP settings:
>
>     Use DNSMasq for DHCP: checked
>     Use DNSMasq for DNS: checked
>     DHCP-Authoritative: checked
>
>
>     Services -> DHCP server:
>
>     Used domain: LAN & WLAN
>     LAN domain: merseine.nu
>
>
>     Services -> DNSMasq:
>
>     DNSMasq: cheked
>     Local DNS: checked
>     No DNS rebind: checked
>
> What am I doing wrong here? Is 'dhcp-host' the wrong option to use? From
> the
> manual, it should add A, AAAA, and PTR records, and I think that is what I
> want it to do. I believe the manual also said that 'host-record' lines
> would
> also create all of the necessary records, but, as stated above, using them
> appears to create an invalid configuration which then prevents dnsmasq from
> even starting.
>
> It seems like much of this would be simpler if I could just add these
> items to
> /etc/hosts on the router, but you cannot do that from the admin GUI, and I
> think if I edit that file on the router it will be overwritten (probably
> on a
> reboot).
>
> Everything else that I use dd-wrt for is functioning properly. I don't make
> much use of many of the more advanced features, so most of them are
> disabled.
>
>
> --
> --John Gruenenfelder    Systems Manager, MKS Imaging Technology, LLC.
> Try Weasel Reader for PalmOS  --  http://weaselreader.org
> "This is the most fun I've had without being drenched in the blood
> of my enemies!"
>         --Sam of Sam & Max
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tfug.org/pipermail/tfug_tfug.org/attachments/20140927/f2fc5fc7/attachment-0002.html>


More information about the tfug mailing list