dnsmasq's server option doesn't work for a specific domain

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











up vote
1
down vote

favorite












I have configured dnsmasq as a local DNS server. Now since my ISP does not resolve some-company.sharepoint.com I want to use Google's servers for the domain sharepoint.com. (See here for the windows solution.)



$ grep "^[^#]" /etc/dnsmasq.conf 
server=/sharepoint.com/8.8.8.8
server=/sharepoint.com/8.8.4.4
listen-address=127.0.0.1


I have configured ǸetworkManager to use dnsmasq



$ cat /etc/NetworkManager/NetworkManager.conf 
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.
[main]
dns=dnsmasq


and restarted.



$ sudo systemctl restart NetworkManager


My resolv.conf now looks like this:



$ cat /etc/resolv.conf
# Generated by NetworkManager
search fritz.box
nameserver 127.0.0.1


Using drill to test:



$ drill some-company.sharepoint.com
;; ->>HEADER<<- opcode: QUERY, rcode: NXDOMAIN, id: 21965
...


While the Google server works...



$ drill some-company.sharepoint.com @8.8.8.8
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 48098


The docs describing the server option say this option is general:




Dnsmasq has the ability to direct DNS queries for certain domains to
specific upstream nameservers. This feature was added for use with
VPNs but it is fully general.








share|improve this question



















  • 8.8.8.8 is an open recursive nameserver, it is not an authoritative nameserver for sharepoint.com. You should use in your dnsmasq configuration the authorative servers IP addresses, hence 40.90.4.203, 64.4.48.203, 13.107.24.203 and 13.107.160.203.
    – Patrick Mevzek
    May 10 at 4:16











  • That doesn't seem to work. The problem of resolving the host with my ISPs DNS seems to be resolved so I had to use Wireshark to see which DNS server is used by dnsmasq and it is clearly sending requests to my router (which seems to be a DNS server itself) and not to one of the given IP addresses.
    – Benjamin
    May 16 at 17:06














up vote
1
down vote

favorite












I have configured dnsmasq as a local DNS server. Now since my ISP does not resolve some-company.sharepoint.com I want to use Google's servers for the domain sharepoint.com. (See here for the windows solution.)



$ grep "^[^#]" /etc/dnsmasq.conf 
server=/sharepoint.com/8.8.8.8
server=/sharepoint.com/8.8.4.4
listen-address=127.0.0.1


I have configured ǸetworkManager to use dnsmasq



$ cat /etc/NetworkManager/NetworkManager.conf 
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.
[main]
dns=dnsmasq


and restarted.



$ sudo systemctl restart NetworkManager


My resolv.conf now looks like this:



$ cat /etc/resolv.conf
# Generated by NetworkManager
search fritz.box
nameserver 127.0.0.1


Using drill to test:



$ drill some-company.sharepoint.com
;; ->>HEADER<<- opcode: QUERY, rcode: NXDOMAIN, id: 21965
...


While the Google server works...



$ drill some-company.sharepoint.com @8.8.8.8
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 48098


The docs describing the server option say this option is general:




Dnsmasq has the ability to direct DNS queries for certain domains to
specific upstream nameservers. This feature was added for use with
VPNs but it is fully general.








share|improve this question



















  • 8.8.8.8 is an open recursive nameserver, it is not an authoritative nameserver for sharepoint.com. You should use in your dnsmasq configuration the authorative servers IP addresses, hence 40.90.4.203, 64.4.48.203, 13.107.24.203 and 13.107.160.203.
    – Patrick Mevzek
    May 10 at 4:16











  • That doesn't seem to work. The problem of resolving the host with my ISPs DNS seems to be resolved so I had to use Wireshark to see which DNS server is used by dnsmasq and it is clearly sending requests to my router (which seems to be a DNS server itself) and not to one of the given IP addresses.
    – Benjamin
    May 16 at 17:06












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have configured dnsmasq as a local DNS server. Now since my ISP does not resolve some-company.sharepoint.com I want to use Google's servers for the domain sharepoint.com. (See here for the windows solution.)



$ grep "^[^#]" /etc/dnsmasq.conf 
server=/sharepoint.com/8.8.8.8
server=/sharepoint.com/8.8.4.4
listen-address=127.0.0.1


I have configured ǸetworkManager to use dnsmasq



$ cat /etc/NetworkManager/NetworkManager.conf 
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.
[main]
dns=dnsmasq


and restarted.



$ sudo systemctl restart NetworkManager


My resolv.conf now looks like this:



$ cat /etc/resolv.conf
# Generated by NetworkManager
search fritz.box
nameserver 127.0.0.1


Using drill to test:



$ drill some-company.sharepoint.com
;; ->>HEADER<<- opcode: QUERY, rcode: NXDOMAIN, id: 21965
...


While the Google server works...



$ drill some-company.sharepoint.com @8.8.8.8
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 48098


The docs describing the server option say this option is general:




Dnsmasq has the ability to direct DNS queries for certain domains to
specific upstream nameservers. This feature was added for use with
VPNs but it is fully general.








share|improve this question











I have configured dnsmasq as a local DNS server. Now since my ISP does not resolve some-company.sharepoint.com I want to use Google's servers for the domain sharepoint.com. (See here for the windows solution.)



$ grep "^[^#]" /etc/dnsmasq.conf 
server=/sharepoint.com/8.8.8.8
server=/sharepoint.com/8.8.4.4
listen-address=127.0.0.1


I have configured ǸetworkManager to use dnsmasq



$ cat /etc/NetworkManager/NetworkManager.conf 
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.
[main]
dns=dnsmasq


and restarted.



$ sudo systemctl restart NetworkManager


My resolv.conf now looks like this:



$ cat /etc/resolv.conf
# Generated by NetworkManager
search fritz.box
nameserver 127.0.0.1


Using drill to test:



$ drill some-company.sharepoint.com
;; ->>HEADER<<- opcode: QUERY, rcode: NXDOMAIN, id: 21965
...


While the Google server works...



$ drill some-company.sharepoint.com @8.8.8.8
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 48098


The docs describing the server option say this option is general:




Dnsmasq has the ability to direct DNS queries for certain domains to
specific upstream nameservers. This feature was added for use with
VPNs but it is fully general.










share|improve this question










share|improve this question




share|improve this question









asked May 8 at 16:28









Benjamin

115




115











  • 8.8.8.8 is an open recursive nameserver, it is not an authoritative nameserver for sharepoint.com. You should use in your dnsmasq configuration the authorative servers IP addresses, hence 40.90.4.203, 64.4.48.203, 13.107.24.203 and 13.107.160.203.
    – Patrick Mevzek
    May 10 at 4:16











  • That doesn't seem to work. The problem of resolving the host with my ISPs DNS seems to be resolved so I had to use Wireshark to see which DNS server is used by dnsmasq and it is clearly sending requests to my router (which seems to be a DNS server itself) and not to one of the given IP addresses.
    – Benjamin
    May 16 at 17:06
















  • 8.8.8.8 is an open recursive nameserver, it is not an authoritative nameserver for sharepoint.com. You should use in your dnsmasq configuration the authorative servers IP addresses, hence 40.90.4.203, 64.4.48.203, 13.107.24.203 and 13.107.160.203.
    – Patrick Mevzek
    May 10 at 4:16











  • That doesn't seem to work. The problem of resolving the host with my ISPs DNS seems to be resolved so I had to use Wireshark to see which DNS server is used by dnsmasq and it is clearly sending requests to my router (which seems to be a DNS server itself) and not to one of the given IP addresses.
    – Benjamin
    May 16 at 17:06















8.8.8.8 is an open recursive nameserver, it is not an authoritative nameserver for sharepoint.com. You should use in your dnsmasq configuration the authorative servers IP addresses, hence 40.90.4.203, 64.4.48.203, 13.107.24.203 and 13.107.160.203.
– Patrick Mevzek
May 10 at 4:16





8.8.8.8 is an open recursive nameserver, it is not an authoritative nameserver for sharepoint.com. You should use in your dnsmasq configuration the authorative servers IP addresses, hence 40.90.4.203, 64.4.48.203, 13.107.24.203 and 13.107.160.203.
– Patrick Mevzek
May 10 at 4:16













That doesn't seem to work. The problem of resolving the host with my ISPs DNS seems to be resolved so I had to use Wireshark to see which DNS server is used by dnsmasq and it is clearly sending requests to my router (which seems to be a DNS server itself) and not to one of the given IP addresses.
– Benjamin
May 16 at 17:06




That doesn't seem to work. The problem of resolving the host with my ISPs DNS seems to be resolved so I had to use Wireshark to see which DNS server is used by dnsmasq and it is clearly sending requests to my router (which seems to be a DNS server itself) and not to one of the given IP addresses.
– Benjamin
May 16 at 17:06










1 Answer
1






active

oldest

votes

















up vote
1
down vote













I could not recreate the situation you encountered.



I assumed a example domain example.com cannot be resolved by the resolver I use. I configured dnsmasq to send questions having this domain to use 8.8.8.8. And dnsmasq's local instance sent questions of this domain (example.com) to Google DNS Resolver only rather than the default resolver I use.






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%2f442593%2fdnsmasqs-server-option-doesnt-work-for-a-specific-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
    1
    down vote













    I could not recreate the situation you encountered.



    I assumed a example domain example.com cannot be resolved by the resolver I use. I configured dnsmasq to send questions having this domain to use 8.8.8.8. And dnsmasq's local instance sent questions of this domain (example.com) to Google DNS Resolver only rather than the default resolver I use.






    share|improve this answer

























      up vote
      1
      down vote













      I could not recreate the situation you encountered.



      I assumed a example domain example.com cannot be resolved by the resolver I use. I configured dnsmasq to send questions having this domain to use 8.8.8.8. And dnsmasq's local instance sent questions of this domain (example.com) to Google DNS Resolver only rather than the default resolver I use.






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        I could not recreate the situation you encountered.



        I assumed a example domain example.com cannot be resolved by the resolver I use. I configured dnsmasq to send questions having this domain to use 8.8.8.8. And dnsmasq's local instance sent questions of this domain (example.com) to Google DNS Resolver only rather than the default resolver I use.






        share|improve this answer













        I could not recreate the situation you encountered.



        I assumed a example domain example.com cannot be resolved by the resolver I use. I configured dnsmasq to send questions having this domain to use 8.8.8.8. And dnsmasq's local instance sent questions of this domain (example.com) to Google DNS Resolver only rather than the default resolver I use.







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jul 1 at 8:43









        Pragathees

        315




        315






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442593%2fdnsmasqs-server-option-doesnt-work-for-a-specific-domain%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay