OpenVPN, resolvconf, and DNS domain resolution

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












7















While at site1, I need to connect to site2 via OpenVPN. Once connected, the OpenVPN site2 pushes a DNS nameserver and domain search options. This causes all name resolutions for site1 to fail.



Example:




  1. Physically connected at site1, DHCP pushes DNS options and resolvconf manages them.

    /etc/resolv.conf



    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 172.16.1.101
    nameserver 172.16.1.102
    search site1.internal.domain



  2. Open OpenVPN tunnel to site2, OpenVPN pushes dhcp-option DNS and DOMAIN for site2 and /etc/openvpn/update-resolv-conf pushes them to resolvconf.

    /etc/resolv.conf



    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 192.168.1.5
    nameserver 172.16.1.101
    nameserver 172.16.1.102
    search site2.internal.domain site1.internal.domain


  3. DNS resolution works for server.site2.internal.domain but fails for server.site1.internal.domain


Is there a way that any failed DNS request to site21 should fall-through to the site1 DNS servers? Or configure resolvconf that only queries for site2.internal.domain should be passed to the site2 nameserver?



I use an Ubuntu 14.04 machine at site1, and the OpenVPN server at site2 is a pfSense 2.2 box. I manage both sites so making changes to either side isn't a problem. Both domains are non-public and internal use only.










share|improve this question






















  • I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.

    – Tim Jones
    Jun 15 '15 at 10:10






  • 1





    i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)

    – nass
    Jun 15 '15 at 12:19















7















While at site1, I need to connect to site2 via OpenVPN. Once connected, the OpenVPN site2 pushes a DNS nameserver and domain search options. This causes all name resolutions for site1 to fail.



Example:




  1. Physically connected at site1, DHCP pushes DNS options and resolvconf manages them.

    /etc/resolv.conf



    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 172.16.1.101
    nameserver 172.16.1.102
    search site1.internal.domain



  2. Open OpenVPN tunnel to site2, OpenVPN pushes dhcp-option DNS and DOMAIN for site2 and /etc/openvpn/update-resolv-conf pushes them to resolvconf.

    /etc/resolv.conf



    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 192.168.1.5
    nameserver 172.16.1.101
    nameserver 172.16.1.102
    search site2.internal.domain site1.internal.domain


  3. DNS resolution works for server.site2.internal.domain but fails for server.site1.internal.domain


Is there a way that any failed DNS request to site21 should fall-through to the site1 DNS servers? Or configure resolvconf that only queries for site2.internal.domain should be passed to the site2 nameserver?



I use an Ubuntu 14.04 machine at site1, and the OpenVPN server at site2 is a pfSense 2.2 box. I manage both sites so making changes to either side isn't a problem. Both domains are non-public and internal use only.










share|improve this question






















  • I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.

    – Tim Jones
    Jun 15 '15 at 10:10






  • 1





    i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)

    – nass
    Jun 15 '15 at 12:19













7












7








7


0






While at site1, I need to connect to site2 via OpenVPN. Once connected, the OpenVPN site2 pushes a DNS nameserver and domain search options. This causes all name resolutions for site1 to fail.



Example:




  1. Physically connected at site1, DHCP pushes DNS options and resolvconf manages them.

    /etc/resolv.conf



    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 172.16.1.101
    nameserver 172.16.1.102
    search site1.internal.domain



  2. Open OpenVPN tunnel to site2, OpenVPN pushes dhcp-option DNS and DOMAIN for site2 and /etc/openvpn/update-resolv-conf pushes them to resolvconf.

    /etc/resolv.conf



    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 192.168.1.5
    nameserver 172.16.1.101
    nameserver 172.16.1.102
    search site2.internal.domain site1.internal.domain


  3. DNS resolution works for server.site2.internal.domain but fails for server.site1.internal.domain


Is there a way that any failed DNS request to site21 should fall-through to the site1 DNS servers? Or configure resolvconf that only queries for site2.internal.domain should be passed to the site2 nameserver?



I use an Ubuntu 14.04 machine at site1, and the OpenVPN server at site2 is a pfSense 2.2 box. I manage both sites so making changes to either side isn't a problem. Both domains are non-public and internal use only.










share|improve this question














While at site1, I need to connect to site2 via OpenVPN. Once connected, the OpenVPN site2 pushes a DNS nameserver and domain search options. This causes all name resolutions for site1 to fail.



Example:




  1. Physically connected at site1, DHCP pushes DNS options and resolvconf manages them.

    /etc/resolv.conf



    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 172.16.1.101
    nameserver 172.16.1.102
    search site1.internal.domain



  2. Open OpenVPN tunnel to site2, OpenVPN pushes dhcp-option DNS and DOMAIN for site2 and /etc/openvpn/update-resolv-conf pushes them to resolvconf.

    /etc/resolv.conf



    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 192.168.1.5
    nameserver 172.16.1.101
    nameserver 172.16.1.102
    search site2.internal.domain site1.internal.domain


  3. DNS resolution works for server.site2.internal.domain but fails for server.site1.internal.domain


Is there a way that any failed DNS request to site21 should fall-through to the site1 DNS servers? Or configure resolvconf that only queries for site2.internal.domain should be passed to the site2 nameserver?



I use an Ubuntu 14.04 machine at site1, and the OpenVPN server at site2 is a pfSense 2.2 box. I manage both sites so making changes to either side isn't a problem. Both domains are non-public and internal use only.







dns openvpn resolvconf resolv.conf






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 15 '15 at 10:06









Tim JonesTim Jones

63115




63115












  • I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.

    – Tim Jones
    Jun 15 '15 at 10:10






  • 1





    i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)

    – nass
    Jun 15 '15 at 12:19

















  • I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.

    – Tim Jones
    Jun 15 '15 at 10:10






  • 1





    i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)

    – nass
    Jun 15 '15 at 12:19
















I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.

– Tim Jones
Jun 15 '15 at 10:10





I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.

– Tim Jones
Jun 15 '15 at 10:10




1




1





i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)

– nass
Jun 15 '15 at 12:19





i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)

– nass
Jun 15 '15 at 12:19










1 Answer
1






active

oldest

votes


















0














resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
Greetings






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%2f209760%2fopenvpn-resolvconf-and-dns-domain-resolution%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














    resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
    You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
    Greetings






    share|improve this answer



























      0














      resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
      You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
      Greetings






      share|improve this answer

























        0












        0








        0







        resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
        You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
        Greetings






        share|improve this answer













        resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
        You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
        Greetings







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 22 '18 at 12:30









        user4089user4089

        914




        914



























            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%2f209760%2fopenvpn-resolvconf-and-dns-domain-resolution%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 check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay