How do I get DNSMasq to serve up DNS to Windows hosts without a domain?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I Have an Ubuntu 16.04 host (10.0.10.2) with DNSMasq installed which is only serving up DNS, and a couple Windows hosts on the same subnet, as well as a couple other Linux hosts on the same subnet. My default gateway is handing out DHCP as well as handing out 10.0.10.2 for a DNS server.



The Windows boxes do not have a DNS search suffix or domain defined, but I want to be able to have them resolve hosts that I've defined in my /etc/hosts on the DNSMasq server WITHOUT having to specify domains or search suffixes, but this is proving to be difficult. According to Wireshark, the Windows hosts always want to append .local when performing a ping or trying to navigate to a web service on the Linux hosts.



My /etc/hosts file is as follows:



127.0.0.1 localhost
10.0.10.2 box-linux-0 box-linux-0.local
10.0.10.3 box-linux-1 box-linux-1.local
10.0.10.3 box-linux-2 box-linux-2.local
10.0.10.7 box-windows-0 box-windows-0.local
10.0.10.5 box-windows-1 box-windows-1.local

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


My DNSMasq config is:



strict-order
port=53
resolv-file=/etc/resolv.conf
log-queries
log-facility=/var/log/dnsmasq.log


And my resolv.conf is:



nameserver 127.0.0.1
nameserver 8.8.8.8


Is there something I'm missing to allow the Windows hosts to just be able to resolve box-linux-0, box-linux-1, box-linux-2?










share|improve this question

























    up vote
    0
    down vote

    favorite












    I Have an Ubuntu 16.04 host (10.0.10.2) with DNSMasq installed which is only serving up DNS, and a couple Windows hosts on the same subnet, as well as a couple other Linux hosts on the same subnet. My default gateway is handing out DHCP as well as handing out 10.0.10.2 for a DNS server.



    The Windows boxes do not have a DNS search suffix or domain defined, but I want to be able to have them resolve hosts that I've defined in my /etc/hosts on the DNSMasq server WITHOUT having to specify domains or search suffixes, but this is proving to be difficult. According to Wireshark, the Windows hosts always want to append .local when performing a ping or trying to navigate to a web service on the Linux hosts.



    My /etc/hosts file is as follows:



    127.0.0.1 localhost
    10.0.10.2 box-linux-0 box-linux-0.local
    10.0.10.3 box-linux-1 box-linux-1.local
    10.0.10.3 box-linux-2 box-linux-2.local
    10.0.10.7 box-windows-0 box-windows-0.local
    10.0.10.5 box-windows-1 box-windows-1.local

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters


    My DNSMasq config is:



    strict-order
    port=53
    resolv-file=/etc/resolv.conf
    log-queries
    log-facility=/var/log/dnsmasq.log


    And my resolv.conf is:



    nameserver 127.0.0.1
    nameserver 8.8.8.8


    Is there something I'm missing to allow the Windows hosts to just be able to resolve box-linux-0, box-linux-1, box-linux-2?










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I Have an Ubuntu 16.04 host (10.0.10.2) with DNSMasq installed which is only serving up DNS, and a couple Windows hosts on the same subnet, as well as a couple other Linux hosts on the same subnet. My default gateway is handing out DHCP as well as handing out 10.0.10.2 for a DNS server.



      The Windows boxes do not have a DNS search suffix or domain defined, but I want to be able to have them resolve hosts that I've defined in my /etc/hosts on the DNSMasq server WITHOUT having to specify domains or search suffixes, but this is proving to be difficult. According to Wireshark, the Windows hosts always want to append .local when performing a ping or trying to navigate to a web service on the Linux hosts.



      My /etc/hosts file is as follows:



      127.0.0.1 localhost
      10.0.10.2 box-linux-0 box-linux-0.local
      10.0.10.3 box-linux-1 box-linux-1.local
      10.0.10.3 box-linux-2 box-linux-2.local
      10.0.10.7 box-windows-0 box-windows-0.local
      10.0.10.5 box-windows-1 box-windows-1.local

      # The following lines are desirable for IPv6 capable hosts
      ::1 ip6-localhost ip6-loopback
      ff02::1 ip6-allnodes
      ff02::2 ip6-allrouters


      My DNSMasq config is:



      strict-order
      port=53
      resolv-file=/etc/resolv.conf
      log-queries
      log-facility=/var/log/dnsmasq.log


      And my resolv.conf is:



      nameserver 127.0.0.1
      nameserver 8.8.8.8


      Is there something I'm missing to allow the Windows hosts to just be able to resolve box-linux-0, box-linux-1, box-linux-2?










      share|improve this question













      I Have an Ubuntu 16.04 host (10.0.10.2) with DNSMasq installed which is only serving up DNS, and a couple Windows hosts on the same subnet, as well as a couple other Linux hosts on the same subnet. My default gateway is handing out DHCP as well as handing out 10.0.10.2 for a DNS server.



      The Windows boxes do not have a DNS search suffix or domain defined, but I want to be able to have them resolve hosts that I've defined in my /etc/hosts on the DNSMasq server WITHOUT having to specify domains or search suffixes, but this is proving to be difficult. According to Wireshark, the Windows hosts always want to append .local when performing a ping or trying to navigate to a web service on the Linux hosts.



      My /etc/hosts file is as follows:



      127.0.0.1 localhost
      10.0.10.2 box-linux-0 box-linux-0.local
      10.0.10.3 box-linux-1 box-linux-1.local
      10.0.10.3 box-linux-2 box-linux-2.local
      10.0.10.7 box-windows-0 box-windows-0.local
      10.0.10.5 box-windows-1 box-windows-1.local

      # The following lines are desirable for IPv6 capable hosts
      ::1 ip6-localhost ip6-loopback
      ff02::1 ip6-allnodes
      ff02::2 ip6-allrouters


      My DNSMasq config is:



      strict-order
      port=53
      resolv-file=/etc/resolv.conf
      log-queries
      log-facility=/var/log/dnsmasq.log


      And my resolv.conf is:



      nameserver 127.0.0.1
      nameserver 8.8.8.8


      Is there something I'm missing to allow the Windows hosts to just be able to resolve box-linux-0, box-linux-1, box-linux-2?







      linux ubuntu dns dnsmasq






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 31 at 2:26









      C. Driscoll

      1




      1




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Your resolv.conf should not have external DNS servers to ensure that dnsmasq is resolving all DNS requests. Change to:



          nameserver 127.0.0.1


          To allow the resolution of external DNS names, use dnsmasq as the global DNS server by telling it to use some external DNS server. Add to DNSmasq config file:




          --server Specify IP address of upstream servers directly.




          server=8.8.8.8


          To make dnsmasq to only resolve names that could actually be global dns names add to DNSmasq config file:



          # Never forward plain names (without a dot or domain part)
          domain-needed
          # Never forward addresses in the non-routed address spaces.
          bogus-priv


          To ensure that local names are resolved by /etc/hosts add to DNSmasq file:



          # Add local-only domains here, queries in these domains are answered
          # from /etc/hosts or DHCP only.
          local=/local./


          You could try this option (may be useful or not):



          # Set this (and domain: see below) if you want to have a domain
          # automatically added to simple names in a hosts-file.
          expand-hosts

          # Set the domain for dnsmasq. this is optional, but if it is set, it
          # does the following things.
          # 1) Allows DHCP hosts to have fully qualified domain names, as long
          # as the domain part matches this setting.
          # 2) Sets the "domain" DHCP option thereby potentially setting the
          # domain of all systems configured by DHCP
          # 3) Provides the domain part for "expand-hosts"
          domain=local





          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f465901%2fhow-do-i-get-dnsmasq-to-serve-up-dns-to-windows-hosts-without-a-domain%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Your resolv.conf should not have external DNS servers to ensure that dnsmasq is resolving all DNS requests. Change to:



            nameserver 127.0.0.1


            To allow the resolution of external DNS names, use dnsmasq as the global DNS server by telling it to use some external DNS server. Add to DNSmasq config file:




            --server Specify IP address of upstream servers directly.




            server=8.8.8.8


            To make dnsmasq to only resolve names that could actually be global dns names add to DNSmasq config file:



            # Never forward plain names (without a dot or domain part)
            domain-needed
            # Never forward addresses in the non-routed address spaces.
            bogus-priv


            To ensure that local names are resolved by /etc/hosts add to DNSmasq file:



            # Add local-only domains here, queries in these domains are answered
            # from /etc/hosts or DHCP only.
            local=/local./


            You could try this option (may be useful or not):



            # Set this (and domain: see below) if you want to have a domain
            # automatically added to simple names in a hosts-file.
            expand-hosts

            # Set the domain for dnsmasq. this is optional, but if it is set, it
            # does the following things.
            # 1) Allows DHCP hosts to have fully qualified domain names, as long
            # as the domain part matches this setting.
            # 2) Sets the "domain" DHCP option thereby potentially setting the
            # domain of all systems configured by DHCP
            # 3) Provides the domain part for "expand-hosts"
            domain=local





            share|improve this answer
























              up vote
              0
              down vote













              Your resolv.conf should not have external DNS servers to ensure that dnsmasq is resolving all DNS requests. Change to:



              nameserver 127.0.0.1


              To allow the resolution of external DNS names, use dnsmasq as the global DNS server by telling it to use some external DNS server. Add to DNSmasq config file:




              --server Specify IP address of upstream servers directly.




              server=8.8.8.8


              To make dnsmasq to only resolve names that could actually be global dns names add to DNSmasq config file:



              # Never forward plain names (without a dot or domain part)
              domain-needed
              # Never forward addresses in the non-routed address spaces.
              bogus-priv


              To ensure that local names are resolved by /etc/hosts add to DNSmasq file:



              # Add local-only domains here, queries in these domains are answered
              # from /etc/hosts or DHCP only.
              local=/local./


              You could try this option (may be useful or not):



              # Set this (and domain: see below) if you want to have a domain
              # automatically added to simple names in a hosts-file.
              expand-hosts

              # Set the domain for dnsmasq. this is optional, but if it is set, it
              # does the following things.
              # 1) Allows DHCP hosts to have fully qualified domain names, as long
              # as the domain part matches this setting.
              # 2) Sets the "domain" DHCP option thereby potentially setting the
              # domain of all systems configured by DHCP
              # 3) Provides the domain part for "expand-hosts"
              domain=local





              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                Your resolv.conf should not have external DNS servers to ensure that dnsmasq is resolving all DNS requests. Change to:



                nameserver 127.0.0.1


                To allow the resolution of external DNS names, use dnsmasq as the global DNS server by telling it to use some external DNS server. Add to DNSmasq config file:




                --server Specify IP address of upstream servers directly.




                server=8.8.8.8


                To make dnsmasq to only resolve names that could actually be global dns names add to DNSmasq config file:



                # Never forward plain names (without a dot or domain part)
                domain-needed
                # Never forward addresses in the non-routed address spaces.
                bogus-priv


                To ensure that local names are resolved by /etc/hosts add to DNSmasq file:



                # Add local-only domains here, queries in these domains are answered
                # from /etc/hosts or DHCP only.
                local=/local./


                You could try this option (may be useful or not):



                # Set this (and domain: see below) if you want to have a domain
                # automatically added to simple names in a hosts-file.
                expand-hosts

                # Set the domain for dnsmasq. this is optional, but if it is set, it
                # does the following things.
                # 1) Allows DHCP hosts to have fully qualified domain names, as long
                # as the domain part matches this setting.
                # 2) Sets the "domain" DHCP option thereby potentially setting the
                # domain of all systems configured by DHCP
                # 3) Provides the domain part for "expand-hosts"
                domain=local





                share|improve this answer












                Your resolv.conf should not have external DNS servers to ensure that dnsmasq is resolving all DNS requests. Change to:



                nameserver 127.0.0.1


                To allow the resolution of external DNS names, use dnsmasq as the global DNS server by telling it to use some external DNS server. Add to DNSmasq config file:




                --server Specify IP address of upstream servers directly.




                server=8.8.8.8


                To make dnsmasq to only resolve names that could actually be global dns names add to DNSmasq config file:



                # Never forward plain names (without a dot or domain part)
                domain-needed
                # Never forward addresses in the non-routed address spaces.
                bogus-priv


                To ensure that local names are resolved by /etc/hosts add to DNSmasq file:



                # Add local-only domains here, queries in these domains are answered
                # from /etc/hosts or DHCP only.
                local=/local./


                You could try this option (may be useful or not):



                # Set this (and domain: see below) if you want to have a domain
                # automatically added to simple names in a hosts-file.
                expand-hosts

                # Set the domain for dnsmasq. this is optional, but if it is set, it
                # does the following things.
                # 1) Allows DHCP hosts to have fully qualified domain names, as long
                # as the domain part matches this setting.
                # 2) Sets the "domain" DHCP option thereby potentially setting the
                # domain of all systems configured by DHCP
                # 3) Provides the domain part for "expand-hosts"
                domain=local






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 31 at 3:17









                Isaac

                7,19111035




                7,19111035



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f465901%2fhow-do-i-get-dnsmasq-to-serve-up-dns-to-windows-hosts-without-a-domain%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)