set DNS entry for hostname for the DD-WRT DNS router itself












2














I'm trying to set a DD-WRT router to reply to DNS requests with it's own hostname (via the DD-WRT router's DNSMasq daemon). I can set other local hostnames (using Static Leases section) and these are returned in DNS queries from the DD-WRT router. But adding the DD-WRT router hostname to it's own mapping of DNS name → IP results in failed DNS hostname lookups.






I'm able to create DNS entries for other hosts on the local network. I did this using by adding entries under Static Leases (under ServicesServicesServices ManagementDHCP ServerStatic Leases). Each entry consists of MAC Addresss, Hostname, IP Address, Client Lease Time. However, an entry for the DD-WRT router itself has no affect (yes, using the LAN-facing MAC Address of the DD-WRT router).



Related DHCP and DNSMasq settings





  • LAN Domain has string "mydomain"


  • Used Domain is "LAN & WLAN"


  • DNSMasq is Enable


  • Local DNS is Enable


  • Query DNS in Strict Order is Enable


For example, there is an Static Leases entry for "PC1". From a different domain host (computer on the same LAN) I can successfully do



$ ping PC1.mydomain


Yet, a similar Static Leases entry "myrouter" exists for the LAN MAC of the DD-WRT router (yes, I am aware the DD-WRT LAN will not request a LAN-side IP via DHCP. The router has a static IP 192.168.1.1. I was trying this to achieve parity with the successful case).



Additional DNSMasq Options



Also, I added to Additional DNSMasq Options these lines



local=/mydomain/
expand-hosts


Then I restarted dnsmasq



$ stopservice dnsmasq
$ startservice dnsmasq


Still fails



Yet, name lookup for myrouter.mydomain still fails



$ ping myrouter.mydomain
ping: myrouter.mydomain: Name or service not known





Oddly, I did not have this name lookup problem before a recent upgrade of the DD-WRT router.










share|improve this question





























    2














    I'm trying to set a DD-WRT router to reply to DNS requests with it's own hostname (via the DD-WRT router's DNSMasq daemon). I can set other local hostnames (using Static Leases section) and these are returned in DNS queries from the DD-WRT router. But adding the DD-WRT router hostname to it's own mapping of DNS name → IP results in failed DNS hostname lookups.






    I'm able to create DNS entries for other hosts on the local network. I did this using by adding entries under Static Leases (under ServicesServicesServices ManagementDHCP ServerStatic Leases). Each entry consists of MAC Addresss, Hostname, IP Address, Client Lease Time. However, an entry for the DD-WRT router itself has no affect (yes, using the LAN-facing MAC Address of the DD-WRT router).



    Related DHCP and DNSMasq settings





    • LAN Domain has string "mydomain"


    • Used Domain is "LAN & WLAN"


    • DNSMasq is Enable


    • Local DNS is Enable


    • Query DNS in Strict Order is Enable


    For example, there is an Static Leases entry for "PC1". From a different domain host (computer on the same LAN) I can successfully do



    $ ping PC1.mydomain


    Yet, a similar Static Leases entry "myrouter" exists for the LAN MAC of the DD-WRT router (yes, I am aware the DD-WRT LAN will not request a LAN-side IP via DHCP. The router has a static IP 192.168.1.1. I was trying this to achieve parity with the successful case).



    Additional DNSMasq Options



    Also, I added to Additional DNSMasq Options these lines



    local=/mydomain/
    expand-hosts


    Then I restarted dnsmasq



    $ stopservice dnsmasq
    $ startservice dnsmasq


    Still fails



    Yet, name lookup for myrouter.mydomain still fails



    $ ping myrouter.mydomain
    ping: myrouter.mydomain: Name or service not known





    Oddly, I did not have this name lookup problem before a recent upgrade of the DD-WRT router.










    share|improve this question



























      2












      2








      2







      I'm trying to set a DD-WRT router to reply to DNS requests with it's own hostname (via the DD-WRT router's DNSMasq daemon). I can set other local hostnames (using Static Leases section) and these are returned in DNS queries from the DD-WRT router. But adding the DD-WRT router hostname to it's own mapping of DNS name → IP results in failed DNS hostname lookups.






      I'm able to create DNS entries for other hosts on the local network. I did this using by adding entries under Static Leases (under ServicesServicesServices ManagementDHCP ServerStatic Leases). Each entry consists of MAC Addresss, Hostname, IP Address, Client Lease Time. However, an entry for the DD-WRT router itself has no affect (yes, using the LAN-facing MAC Address of the DD-WRT router).



      Related DHCP and DNSMasq settings





      • LAN Domain has string "mydomain"


      • Used Domain is "LAN & WLAN"


      • DNSMasq is Enable


      • Local DNS is Enable


      • Query DNS in Strict Order is Enable


      For example, there is an Static Leases entry for "PC1". From a different domain host (computer on the same LAN) I can successfully do



      $ ping PC1.mydomain


      Yet, a similar Static Leases entry "myrouter" exists for the LAN MAC of the DD-WRT router (yes, I am aware the DD-WRT LAN will not request a LAN-side IP via DHCP. The router has a static IP 192.168.1.1. I was trying this to achieve parity with the successful case).



      Additional DNSMasq Options



      Also, I added to Additional DNSMasq Options these lines



      local=/mydomain/
      expand-hosts


      Then I restarted dnsmasq



      $ stopservice dnsmasq
      $ startservice dnsmasq


      Still fails



      Yet, name lookup for myrouter.mydomain still fails



      $ ping myrouter.mydomain
      ping: myrouter.mydomain: Name or service not known





      Oddly, I did not have this name lookup problem before a recent upgrade of the DD-WRT router.










      share|improve this question















      I'm trying to set a DD-WRT router to reply to DNS requests with it's own hostname (via the DD-WRT router's DNSMasq daemon). I can set other local hostnames (using Static Leases section) and these are returned in DNS queries from the DD-WRT router. But adding the DD-WRT router hostname to it's own mapping of DNS name → IP results in failed DNS hostname lookups.






      I'm able to create DNS entries for other hosts on the local network. I did this using by adding entries under Static Leases (under ServicesServicesServices ManagementDHCP ServerStatic Leases). Each entry consists of MAC Addresss, Hostname, IP Address, Client Lease Time. However, an entry for the DD-WRT router itself has no affect (yes, using the LAN-facing MAC Address of the DD-WRT router).



      Related DHCP and DNSMasq settings





      • LAN Domain has string "mydomain"


      • Used Domain is "LAN & WLAN"


      • DNSMasq is Enable


      • Local DNS is Enable


      • Query DNS in Strict Order is Enable


      For example, there is an Static Leases entry for "PC1". From a different domain host (computer on the same LAN) I can successfully do



      $ ping PC1.mydomain


      Yet, a similar Static Leases entry "myrouter" exists for the LAN MAC of the DD-WRT router (yes, I am aware the DD-WRT LAN will not request a LAN-side IP via DHCP. The router has a static IP 192.168.1.1. I was trying this to achieve parity with the successful case).



      Additional DNSMasq Options



      Also, I added to Additional DNSMasq Options these lines



      local=/mydomain/
      expand-hosts


      Then I restarted dnsmasq



      $ stopservice dnsmasq
      $ startservice dnsmasq


      Still fails



      Yet, name lookup for myrouter.mydomain still fails



      $ ping myrouter.mydomain
      ping: myrouter.mydomain: Name or service not known





      Oddly, I did not have this name lookup problem before a recent upgrade of the DD-WRT router.







      dnsmasq dd-wrt






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 days ago







      JamesThomasMoon1979

















      asked Jan 7 at 23:18









      JamesThomasMoon1979JamesThomasMoon1979

      267210




      267210






















          1 Answer
          1






          active

          oldest

          votes


















          0














          In section Additional DNSMasq Options (under ServicesServicesServices ManagementDHCP ServerStatic Leases), add the following line



          address=/myrouter.mydomain/192.168.1.1





          Suggestion is from this old forum post. The address parameter is explained at the dnsmasq man page (search for "--address=").






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493112%2fset-dns-entry-for-hostname-for-the-dd-wrt-dns-router-itself%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            In section Additional DNSMasq Options (under ServicesServicesServices ManagementDHCP ServerStatic Leases), add the following line



            address=/myrouter.mydomain/192.168.1.1





            Suggestion is from this old forum post. The address parameter is explained at the dnsmasq man page (search for "--address=").






            share|improve this answer




























              0














              In section Additional DNSMasq Options (under ServicesServicesServices ManagementDHCP ServerStatic Leases), add the following line



              address=/myrouter.mydomain/192.168.1.1





              Suggestion is from this old forum post. The address parameter is explained at the dnsmasq man page (search for "--address=").






              share|improve this answer


























                0












                0








                0






                In section Additional DNSMasq Options (under ServicesServicesServices ManagementDHCP ServerStatic Leases), add the following line



                address=/myrouter.mydomain/192.168.1.1





                Suggestion is from this old forum post. The address parameter is explained at the dnsmasq man page (search for "--address=").






                share|improve this answer














                In section Additional DNSMasq Options (under ServicesServicesServices ManagementDHCP ServerStatic Leases), add the following line



                address=/myrouter.mydomain/192.168.1.1





                Suggestion is from this old forum post. The address parameter is explained at the dnsmasq man page (search for "--address=").







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 days ago

























                answered Jan 7 at 23:18









                JamesThomasMoon1979JamesThomasMoon1979

                267210




                267210






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493112%2fset-dns-entry-for-hostname-for-the-dd-wrt-dns-router-itself%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

                    is 'sed' thread safe

                    How to make a Squid Proxy server?