Ubuntu 18.04 ignores DNS pushed by openvpn











up vote
0
down vote

favorite












I read threads like



Ubuntu 18.04 no DNS resolution when connected to openvpn and https://serverfault.com/questions/528773/networkmanager-is-not-changing-etc-resolv-conf-after-openvpn-dns-push
plus suggested threads when writing this post



but still fail to connect with corpo lan when using openvpn.



/etc/resolve.conf:



nameserver 8.8.8.8
nameserver 10.1.1.10
nameserver 127.0.0.53


my.ovpn script contains at the end:



script-security 2                                                                                                       
push "dhcp-option DNS 10.1.1.10"

up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
down-pre


Corpo DNS is 10.1.1.10 and after openvpn connection I expect that if domain could not be reloved by google dns (8.8.8.8), then we try to resolve it using second nameserver. But it does not work like this.



Workaround that works



If in /etc/network/interfaces I change order of DNS from:



auto lo
iface lo inet loopback
dns-nameservers 8.8.8.8 10.1.1.10


to



auto lo
iface lo inet loopback
dns-nameservers 10.1.1.10 8.8.8.8


then I can access to corpo lan, but whole network start work very, very slow. Specially if I'm out of VPN (they try to resolve 10.1.1.10, cannot connect, then go to 8.8.8.8, but avg load time website id more than 10sec).



I have no idea what is wrong with my configuration.










share|improve this question


























    up vote
    0
    down vote

    favorite












    I read threads like



    Ubuntu 18.04 no DNS resolution when connected to openvpn and https://serverfault.com/questions/528773/networkmanager-is-not-changing-etc-resolv-conf-after-openvpn-dns-push
    plus suggested threads when writing this post



    but still fail to connect with corpo lan when using openvpn.



    /etc/resolve.conf:



    nameserver 8.8.8.8
    nameserver 10.1.1.10
    nameserver 127.0.0.53


    my.ovpn script contains at the end:



    script-security 2                                                                                                       
    push "dhcp-option DNS 10.1.1.10"

    up /etc/openvpn/update-resolv-conf
    down /etc/openvpn/update-resolv-conf
    down-pre


    Corpo DNS is 10.1.1.10 and after openvpn connection I expect that if domain could not be reloved by google dns (8.8.8.8), then we try to resolve it using second nameserver. But it does not work like this.



    Workaround that works



    If in /etc/network/interfaces I change order of DNS from:



    auto lo
    iface lo inet loopback
    dns-nameservers 8.8.8.8 10.1.1.10


    to



    auto lo
    iface lo inet loopback
    dns-nameservers 10.1.1.10 8.8.8.8


    then I can access to corpo lan, but whole network start work very, very slow. Specially if I'm out of VPN (they try to resolve 10.1.1.10, cannot connect, then go to 8.8.8.8, but avg load time website id more than 10sec).



    I have no idea what is wrong with my configuration.










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I read threads like



      Ubuntu 18.04 no DNS resolution when connected to openvpn and https://serverfault.com/questions/528773/networkmanager-is-not-changing-etc-resolv-conf-after-openvpn-dns-push
      plus suggested threads when writing this post



      but still fail to connect with corpo lan when using openvpn.



      /etc/resolve.conf:



      nameserver 8.8.8.8
      nameserver 10.1.1.10
      nameserver 127.0.0.53


      my.ovpn script contains at the end:



      script-security 2                                                                                                       
      push "dhcp-option DNS 10.1.1.10"

      up /etc/openvpn/update-resolv-conf
      down /etc/openvpn/update-resolv-conf
      down-pre


      Corpo DNS is 10.1.1.10 and after openvpn connection I expect that if domain could not be reloved by google dns (8.8.8.8), then we try to resolve it using second nameserver. But it does not work like this.



      Workaround that works



      If in /etc/network/interfaces I change order of DNS from:



      auto lo
      iface lo inet loopback
      dns-nameservers 8.8.8.8 10.1.1.10


      to



      auto lo
      iface lo inet loopback
      dns-nameservers 10.1.1.10 8.8.8.8


      then I can access to corpo lan, but whole network start work very, very slow. Specially if I'm out of VPN (they try to resolve 10.1.1.10, cannot connect, then go to 8.8.8.8, but avg load time website id more than 10sec).



      I have no idea what is wrong with my configuration.










      share|improve this question













      I read threads like



      Ubuntu 18.04 no DNS resolution when connected to openvpn and https://serverfault.com/questions/528773/networkmanager-is-not-changing-etc-resolv-conf-after-openvpn-dns-push
      plus suggested threads when writing this post



      but still fail to connect with corpo lan when using openvpn.



      /etc/resolve.conf:



      nameserver 8.8.8.8
      nameserver 10.1.1.10
      nameserver 127.0.0.53


      my.ovpn script contains at the end:



      script-security 2                                                                                                       
      push "dhcp-option DNS 10.1.1.10"

      up /etc/openvpn/update-resolv-conf
      down /etc/openvpn/update-resolv-conf
      down-pre


      Corpo DNS is 10.1.1.10 and after openvpn connection I expect that if domain could not be reloved by google dns (8.8.8.8), then we try to resolve it using second nameserver. But it does not work like this.



      Workaround that works



      If in /etc/network/interfaces I change order of DNS from:



      auto lo
      iface lo inet loopback
      dns-nameservers 8.8.8.8 10.1.1.10


      to



      auto lo
      iface lo inet loopback
      dns-nameservers 10.1.1.10 8.8.8.8


      then I can access to corpo lan, but whole network start work very, very slow. Specially if I'm out of VPN (they try to resolve 10.1.1.10, cannot connect, then go to 8.8.8.8, but avg load time website id more than 10sec).



      I have no idea what is wrong with my configuration.







      networking dns vpn openvpn






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 16 at 12:10









      Koziołek

      1012




      1012



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          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: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2faskubuntu.com%2fquestions%2f1093452%2fubuntu-18-04-ignores-dns-pushed-by-openvpn%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093452%2fubuntu-18-04-ignores-dns-pushed-by-openvpn%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 send String Array data to Server using php in android

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

          Is anime1.com a legal site for watching anime?