dnsmasq as local secondary authoritative dns server

6,219

I don't know about the Windows Server part, but Dnsmasq does not support running as secondary (or slave) name server (see https://en.wikipedia.org/wiki/Comparison_of_DNS_server_software#Feature_matrix). Also as an official source, Dnsmasq's site does not mention anything on "secondary" or "slave" except config to authorize secondaries to query Dnsmasq for zone transfers.

On OpenWRT you could use Bind9 as name server which supports running as a slave server. PowerDNS would be another DNS server software that can serve slave zones, but there seem to be no packages for OpenWRT.

Share:
6,219

Related videos on Youtube

Rhyknowscerious
Author by

Rhyknowscerious

I love computers!

Updated on September 18, 2022

Comments

  • Rhyknowscerious
    Rhyknowscerious over 1 year

    I've got Windows Server 2012 R2 as a local-only AD/DNS server which needs to be shut-down at times for personal reasons. By the way, this server does everything its supposed to do when it's up: provide local DNS names for hosts on my LAN.

    I'm trying to just add my RPi1B running dnsmasq on OpenWRT as a secondary DNS server for when I have to shut down my Windows server. I also thought I could just setup zone transfers so I don't have to fully configure all the names twice everytime I want to make a change or add a new host.

    The domain is home.local. All local IP addresses are in 10.0.0.0/25 (255.255.255.128)

    In Windows DNS Manager, I have A records, CNAMES and a reverse lookup zone.

    • My Windows machine is server01.home.local at 10.0.0.20.
    • My RPi1B (OpenWRT) is router02.home.local at 10.0.0.3.

    In Windows DNS Manager, I changed the properties for home.local and 0.0.10.in-addr.arpa as follows:

    • Added router02.home.local 10.0.0.3 to the list of name servers
    • Allow zone transfers to servers in the Name Server Tab
    • Allow automatic notification to servers listed on the name servers tab

    In the Name Servers tab, 10.0.0.3 won't validate The server with this IP address is not authoritative for the required zone.

    On my RPi1B I have the following configuration files:

    /etc/config/dhcp:

    config dnsmasq
        option localise_queries '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option rebind_protection '0'
        option dhcpleasemax '0'
        option domainneeded '1'
        option domain 'home.local'
        option local '/home.local/'
        option expandhosts '1'
        list server '10.0.0.20'
    
    config dhcp 'lan'
        option interface 'lan'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'
        option ignore '1'
    
    config dhcp 'wan'
        option interface 'wan'
        option ignore '1'
    
    config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
    
    config dhcp
        option interface 'eth1_usb'
        option start '150'
        option limit '50'
        option leasetime '30m'
    
    config domain
        option name 'localhost'
        option ip '127.0.0.1'
    

    /tmp/resolv.conf.auto:

    # empty
    

    /tmp/resolv.conf:

    search home.local
    nameserver 127.0.0.1
    

    /tmp/hosts/dhcp

    # auto-generated config file from /etc/conf/dhcp
    127.0.0.1 localhost
    10.0.0.3 router02
    

    /etc/hosts

    127.0.0.1
    

    I have a decent amount of networking knowledge and a basic familiarity with linux command line but I am completely new to DNS. Any help would be extremely helpful.

  • Rhyknowscerious
    Rhyknowscerious over 6 years
    Oh my god. I spent hours and hours and hours trying to get dnsmasq to accept a stupid zone transfer. I wish I would have found that wikipedia page way sooner. Thanks for the confirmation on that. I'm using BIND now and it works beautifully.