How do I change my DNS on Ubuntu 18.04? Which DNS should I use?How do I change the primary DNS address of my DSL connection in Ubuntu 14.04?change DNS using terminal - public DNSUse Ubuntu DNS Server instead of WindowsDNS setting not persistent 18.04Ubuntu 18.04 Desktop DNS ServersUbuntu 18.04 how to use DNS server for all FQDN queries?block outside dns, fix dns leak ubuntu 18.04Change DNS Server given during Ubuntu 18.04 installationUbuntu 18.04 not resolving dns?DNS Resolve is not working on 18.04 server

Does int main() need a declaration on C++?

How exploitable/balanced is this homebrew spell: Spell Permanency?

How can I prove that a state of equilibrium is unstable?

Is it possible to create a QR code using text?

Is it possible to map the firing of neurons in the human brain so as to stimulate artificial memories in someone else?

Pact of Blade Warlock with Dancing Blade

Rotate ASCII Art by 45 Degrees

How can saying a song's name be a copyright violation?

How obscure is the use of 令 in 令和?

What is the opposite of "eschatology"?

What are the G forces leaving Earth orbit?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

Why do I get negative height?

Should I tell management that I intend to leave due to bad software development practices?

Can a virus destroy the BIOS of a modern computer?

What would the climate of a planetwide city be like?

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

How to show a landlord what we have in savings?

Could neural networks be considered metaheuristics?

Is it "common practice in Fourier transform spectroscopy to multiply the measured interferogram by an apodizing function"? If so, why?

How to travel to Japan while expressing milk?

Forgetting the musical notes while performing in concert

How does a dynamic QR code work?

Standard deduction V. mortgage interest deduction - is it basically only for the rich?



How do I change my DNS on Ubuntu 18.04? Which DNS should I use?


How do I change the primary DNS address of my DSL connection in Ubuntu 14.04?change DNS using terminal - public DNSUse Ubuntu DNS Server instead of WindowsDNS setting not persistent 18.04Ubuntu 18.04 Desktop DNS ServersUbuntu 18.04 how to use DNS server for all FQDN queries?block outside dns, fix dns leak ubuntu 18.04Change DNS Server given during Ubuntu 18.04 installationUbuntu 18.04 not resolving dns?DNS Resolve is not working on 18.04 server













1















I'm recently interested in DNS for a cleaner, faster & more secure Internet surfing. In my country many websites are obscured and I was told that changing DNS may allow me to use them as I did before. I also don't like to share my metadata with others and some DNSs, such as the ones provided by OpenDNS, seem to provide more privacy to the user.



Is it true that changing DNS results in a more secure web experience?



How do I change DNS on Ubuntu 18.04, and most importantly, which DNS should I switch to?










share|improve this question




























    1















    I'm recently interested in DNS for a cleaner, faster & more secure Internet surfing. In my country many websites are obscured and I was told that changing DNS may allow me to use them as I did before. I also don't like to share my metadata with others and some DNSs, such as the ones provided by OpenDNS, seem to provide more privacy to the user.



    Is it true that changing DNS results in a more secure web experience?



    How do I change DNS on Ubuntu 18.04, and most importantly, which DNS should I switch to?










    share|improve this question


























      1












      1








      1








      I'm recently interested in DNS for a cleaner, faster & more secure Internet surfing. In my country many websites are obscured and I was told that changing DNS may allow me to use them as I did before. I also don't like to share my metadata with others and some DNSs, such as the ones provided by OpenDNS, seem to provide more privacy to the user.



      Is it true that changing DNS results in a more secure web experience?



      How do I change DNS on Ubuntu 18.04, and most importantly, which DNS should I switch to?










      share|improve this question
















      I'm recently interested in DNS for a cleaner, faster & more secure Internet surfing. In my country many websites are obscured and I was told that changing DNS may allow me to use them as I did before. I also don't like to share my metadata with others and some DNSs, such as the ones provided by OpenDNS, seem to provide more privacy to the user.



      Is it true that changing DNS results in a more secure web experience?



      How do I change DNS on Ubuntu 18.04, and most importantly, which DNS should I switch to?







      networking server 18.04 dns opendns






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 31 '18 at 10:39









      Sourav Ghosh

      38329




      38329










      asked Dec 24 '18 at 18:49









      Akane YoshinegaAkane Yoshinega

      299




      299




















          3 Answers
          3






          active

          oldest

          votes


















          3














          First, I recommend that you install namebench.



          namebench searches the fastest DNS servers available for your computer to use. namebench runs a fair and thorough benchmark using your web browser history, tcpdump output, or standardized datasets in order to provide an individualized recommendation.



          Install namebench from the terminal:



          sudo apt update && sudo apt install namebench


          Start the program:



          namebench


          namebench makes thousands of queries and takes a few minutes to complete; please be patient. When it completes, a report will be prepared that illustrates the fastest available nameservers. Here is a sample from my machine:




          Saving report to /tmp/namebench_2018-12-24_1436.html




          When we examine the saved report, we see:



          enter image description here



          Once you know the two or three most ideal nameservers, apply them in Network Manager's settings like this:



          enter image description here



          Turn DNS Automatic to off. Insert the IP addresses of the preferred nameservers, seperated by commas, click Apply and close.






          share|improve this answer























          • Seems far easier than on Windows! Thanks!

            – Akane Yoshinega
            Dec 25 '18 at 20:28











          • If my answer has been helpful, please accept it: askubuntu.com/tour The searchers will appreciate it.

            – chili555
            Dec 26 '18 at 2:26











          • I wan unable to install namebench. It says: E: Unable to locate package namebench

            – Akane Yoshinega
            Jan 19 at 16:45












          • Which Ubuntu version? lsb_release -d Are you quite sure that you first ran: sudo apt update?

            – chili555
            Jan 19 at 17:42











          • Ubuntu 18.04.1 LTS, yes I ran sudo apt update and i even tried with sudo apt-get update

            – Akane Yoshinega
            Jan 20 at 8:46


















          1














          Does changing DNS result it a more secure web experience?



          Yes, only if you do not trust your network provider. In which case, you can set up DNS. I actually use Google DNS, as this is generally faster.



          Normally OpenDNS and GoogleDNS are faster than provider DNS.



          However, there is a catch. If your network is such that it requires you to login before you can access the internet (like in airports, some cafes, co-working spaces), then they might not work if you overwrite the provider's DNS settings, as their authentication process depends upon DNS.



          There is, however a very good solution available. You setup DNS per connection.



          1. Right click on the network manager icon in the panel and choose "Edit connections..."

          2. Select your connection from the wired or wireless tab, choose "Edit"

          3. (Enter your password if the connection is set as "system-wide available")

          4. Choose IPv4 settings tab

          5. Switch method to "Automatic (DHCP) addresses only"

          6. Enter the name server you want in the box "Additional DNS servers" and press "Apply"

          Network Configuration Window



          Finally, for the command line oriented: Open the connection file in Network Manager. For example, if the WiFi Name is Tarzan, then look for a file (case sensitive):



          /etc/NetworkManager/system-connections/Tarzan



          In that file, make sure the ipv4 block is like this:



          [ipv4]
          dns=8.8.4.4;8.8.8.8;
          dns-search=
          ignore-auto-dns=true
          method=auto


          replace 8.8.4.4;8.8.8.8; with your DNS servers.



           method=auto


          This instructs NetworkManager to use DHCP to get IP address for the interface.



           ignore-auto-dns=true


          This instructs NetworkManager to ignore the DHCP provided DNS servers.



          That should do the trick.

          You need to do that for every WiFi AP that you connect to.



          PS: Google DNS are 8.8.8.8 , 8.8.4.4






          share|improve this answer

























          • I'm looking forward to try this on my pc!

            – Akane Yoshinega
            Dec 25 '18 at 20:29











          • I edited the server's name in the box "Additional DNS servers", but when I try to do a benchmark with namebench it keeps reporting my old primary server's number instead of the new OpenDNS's one.

            – Akane Yoshinega
            Jan 21 at 11:15











          • @AkaneYoshinega Switch Method to "Automatic (DHCP) addresses only"; the Other (or Additional) DNS Servers will change to DNS Servers. These are the servers then the system will use. I have updated the answer with an image of the window.

            – Domo N Car
            Jan 26 at 14:46


















          0














          Thank you friends thats work (changed dns ipv4 to google)
          but how tochange ipv6 to google?
          ipv6 tab on ubuntu cinnamon some what diffrent



          i will thank your help.






          share|improve this answer








          New contributor




          yellowchen12P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















            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',
            autoActivateHeartbeat: false,
            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%2f1104303%2fhow-do-i-change-my-dns-on-ubuntu-18-04-which-dns-should-i-use%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            First, I recommend that you install namebench.



            namebench searches the fastest DNS servers available for your computer to use. namebench runs a fair and thorough benchmark using your web browser history, tcpdump output, or standardized datasets in order to provide an individualized recommendation.



            Install namebench from the terminal:



            sudo apt update && sudo apt install namebench


            Start the program:



            namebench


            namebench makes thousands of queries and takes a few minutes to complete; please be patient. When it completes, a report will be prepared that illustrates the fastest available nameservers. Here is a sample from my machine:




            Saving report to /tmp/namebench_2018-12-24_1436.html




            When we examine the saved report, we see:



            enter image description here



            Once you know the two or three most ideal nameservers, apply them in Network Manager's settings like this:



            enter image description here



            Turn DNS Automatic to off. Insert the IP addresses of the preferred nameservers, seperated by commas, click Apply and close.






            share|improve this answer























            • Seems far easier than on Windows! Thanks!

              – Akane Yoshinega
              Dec 25 '18 at 20:28











            • If my answer has been helpful, please accept it: askubuntu.com/tour The searchers will appreciate it.

              – chili555
              Dec 26 '18 at 2:26











            • I wan unable to install namebench. It says: E: Unable to locate package namebench

              – Akane Yoshinega
              Jan 19 at 16:45












            • Which Ubuntu version? lsb_release -d Are you quite sure that you first ran: sudo apt update?

              – chili555
              Jan 19 at 17:42











            • Ubuntu 18.04.1 LTS, yes I ran sudo apt update and i even tried with sudo apt-get update

              – Akane Yoshinega
              Jan 20 at 8:46















            3














            First, I recommend that you install namebench.



            namebench searches the fastest DNS servers available for your computer to use. namebench runs a fair and thorough benchmark using your web browser history, tcpdump output, or standardized datasets in order to provide an individualized recommendation.



            Install namebench from the terminal:



            sudo apt update && sudo apt install namebench


            Start the program:



            namebench


            namebench makes thousands of queries and takes a few minutes to complete; please be patient. When it completes, a report will be prepared that illustrates the fastest available nameservers. Here is a sample from my machine:




            Saving report to /tmp/namebench_2018-12-24_1436.html




            When we examine the saved report, we see:



            enter image description here



            Once you know the two or three most ideal nameservers, apply them in Network Manager's settings like this:



            enter image description here



            Turn DNS Automatic to off. Insert the IP addresses of the preferred nameservers, seperated by commas, click Apply and close.






            share|improve this answer























            • Seems far easier than on Windows! Thanks!

              – Akane Yoshinega
              Dec 25 '18 at 20:28











            • If my answer has been helpful, please accept it: askubuntu.com/tour The searchers will appreciate it.

              – chili555
              Dec 26 '18 at 2:26











            • I wan unable to install namebench. It says: E: Unable to locate package namebench

              – Akane Yoshinega
              Jan 19 at 16:45












            • Which Ubuntu version? lsb_release -d Are you quite sure that you first ran: sudo apt update?

              – chili555
              Jan 19 at 17:42











            • Ubuntu 18.04.1 LTS, yes I ran sudo apt update and i even tried with sudo apt-get update

              – Akane Yoshinega
              Jan 20 at 8:46













            3












            3








            3







            First, I recommend that you install namebench.



            namebench searches the fastest DNS servers available for your computer to use. namebench runs a fair and thorough benchmark using your web browser history, tcpdump output, or standardized datasets in order to provide an individualized recommendation.



            Install namebench from the terminal:



            sudo apt update && sudo apt install namebench


            Start the program:



            namebench


            namebench makes thousands of queries and takes a few minutes to complete; please be patient. When it completes, a report will be prepared that illustrates the fastest available nameservers. Here is a sample from my machine:




            Saving report to /tmp/namebench_2018-12-24_1436.html




            When we examine the saved report, we see:



            enter image description here



            Once you know the two or three most ideal nameservers, apply them in Network Manager's settings like this:



            enter image description here



            Turn DNS Automatic to off. Insert the IP addresses of the preferred nameservers, seperated by commas, click Apply and close.






            share|improve this answer













            First, I recommend that you install namebench.



            namebench searches the fastest DNS servers available for your computer to use. namebench runs a fair and thorough benchmark using your web browser history, tcpdump output, or standardized datasets in order to provide an individualized recommendation.



            Install namebench from the terminal:



            sudo apt update && sudo apt install namebench


            Start the program:



            namebench


            namebench makes thousands of queries and takes a few minutes to complete; please be patient. When it completes, a report will be prepared that illustrates the fastest available nameservers. Here is a sample from my machine:




            Saving report to /tmp/namebench_2018-12-24_1436.html




            When we examine the saved report, we see:



            enter image description here



            Once you know the two or three most ideal nameservers, apply them in Network Manager's settings like this:



            enter image description here



            Turn DNS Automatic to off. Insert the IP addresses of the preferred nameservers, seperated by commas, click Apply and close.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 24 '18 at 19:42









            chili555chili555

            39k55280




            39k55280












            • Seems far easier than on Windows! Thanks!

              – Akane Yoshinega
              Dec 25 '18 at 20:28











            • If my answer has been helpful, please accept it: askubuntu.com/tour The searchers will appreciate it.

              – chili555
              Dec 26 '18 at 2:26











            • I wan unable to install namebench. It says: E: Unable to locate package namebench

              – Akane Yoshinega
              Jan 19 at 16:45












            • Which Ubuntu version? lsb_release -d Are you quite sure that you first ran: sudo apt update?

              – chili555
              Jan 19 at 17:42











            • Ubuntu 18.04.1 LTS, yes I ran sudo apt update and i even tried with sudo apt-get update

              – Akane Yoshinega
              Jan 20 at 8:46

















            • Seems far easier than on Windows! Thanks!

              – Akane Yoshinega
              Dec 25 '18 at 20:28











            • If my answer has been helpful, please accept it: askubuntu.com/tour The searchers will appreciate it.

              – chili555
              Dec 26 '18 at 2:26











            • I wan unable to install namebench. It says: E: Unable to locate package namebench

              – Akane Yoshinega
              Jan 19 at 16:45












            • Which Ubuntu version? lsb_release -d Are you quite sure that you first ran: sudo apt update?

              – chili555
              Jan 19 at 17:42











            • Ubuntu 18.04.1 LTS, yes I ran sudo apt update and i even tried with sudo apt-get update

              – Akane Yoshinega
              Jan 20 at 8:46
















            Seems far easier than on Windows! Thanks!

            – Akane Yoshinega
            Dec 25 '18 at 20:28





            Seems far easier than on Windows! Thanks!

            – Akane Yoshinega
            Dec 25 '18 at 20:28













            If my answer has been helpful, please accept it: askubuntu.com/tour The searchers will appreciate it.

            – chili555
            Dec 26 '18 at 2:26





            If my answer has been helpful, please accept it: askubuntu.com/tour The searchers will appreciate it.

            – chili555
            Dec 26 '18 at 2:26













            I wan unable to install namebench. It says: E: Unable to locate package namebench

            – Akane Yoshinega
            Jan 19 at 16:45






            I wan unable to install namebench. It says: E: Unable to locate package namebench

            – Akane Yoshinega
            Jan 19 at 16:45














            Which Ubuntu version? lsb_release -d Are you quite sure that you first ran: sudo apt update?

            – chili555
            Jan 19 at 17:42





            Which Ubuntu version? lsb_release -d Are you quite sure that you first ran: sudo apt update?

            – chili555
            Jan 19 at 17:42













            Ubuntu 18.04.1 LTS, yes I ran sudo apt update and i even tried with sudo apt-get update

            – Akane Yoshinega
            Jan 20 at 8:46





            Ubuntu 18.04.1 LTS, yes I ran sudo apt update and i even tried with sudo apt-get update

            – Akane Yoshinega
            Jan 20 at 8:46













            1














            Does changing DNS result it a more secure web experience?



            Yes, only if you do not trust your network provider. In which case, you can set up DNS. I actually use Google DNS, as this is generally faster.



            Normally OpenDNS and GoogleDNS are faster than provider DNS.



            However, there is a catch. If your network is such that it requires you to login before you can access the internet (like in airports, some cafes, co-working spaces), then they might not work if you overwrite the provider's DNS settings, as their authentication process depends upon DNS.



            There is, however a very good solution available. You setup DNS per connection.



            1. Right click on the network manager icon in the panel and choose "Edit connections..."

            2. Select your connection from the wired or wireless tab, choose "Edit"

            3. (Enter your password if the connection is set as "system-wide available")

            4. Choose IPv4 settings tab

            5. Switch method to "Automatic (DHCP) addresses only"

            6. Enter the name server you want in the box "Additional DNS servers" and press "Apply"

            Network Configuration Window



            Finally, for the command line oriented: Open the connection file in Network Manager. For example, if the WiFi Name is Tarzan, then look for a file (case sensitive):



            /etc/NetworkManager/system-connections/Tarzan



            In that file, make sure the ipv4 block is like this:



            [ipv4]
            dns=8.8.4.4;8.8.8.8;
            dns-search=
            ignore-auto-dns=true
            method=auto


            replace 8.8.4.4;8.8.8.8; with your DNS servers.



             method=auto


            This instructs NetworkManager to use DHCP to get IP address for the interface.



             ignore-auto-dns=true


            This instructs NetworkManager to ignore the DHCP provided DNS servers.



            That should do the trick.

            You need to do that for every WiFi AP that you connect to.



            PS: Google DNS are 8.8.8.8 , 8.8.4.4






            share|improve this answer

























            • I'm looking forward to try this on my pc!

              – Akane Yoshinega
              Dec 25 '18 at 20:29











            • I edited the server's name in the box "Additional DNS servers", but when I try to do a benchmark with namebench it keeps reporting my old primary server's number instead of the new OpenDNS's one.

              – Akane Yoshinega
              Jan 21 at 11:15











            • @AkaneYoshinega Switch Method to "Automatic (DHCP) addresses only"; the Other (or Additional) DNS Servers will change to DNS Servers. These are the servers then the system will use. I have updated the answer with an image of the window.

              – Domo N Car
              Jan 26 at 14:46















            1














            Does changing DNS result it a more secure web experience?



            Yes, only if you do not trust your network provider. In which case, you can set up DNS. I actually use Google DNS, as this is generally faster.



            Normally OpenDNS and GoogleDNS are faster than provider DNS.



            However, there is a catch. If your network is such that it requires you to login before you can access the internet (like in airports, some cafes, co-working spaces), then they might not work if you overwrite the provider's DNS settings, as their authentication process depends upon DNS.



            There is, however a very good solution available. You setup DNS per connection.



            1. Right click on the network manager icon in the panel and choose "Edit connections..."

            2. Select your connection from the wired or wireless tab, choose "Edit"

            3. (Enter your password if the connection is set as "system-wide available")

            4. Choose IPv4 settings tab

            5. Switch method to "Automatic (DHCP) addresses only"

            6. Enter the name server you want in the box "Additional DNS servers" and press "Apply"

            Network Configuration Window



            Finally, for the command line oriented: Open the connection file in Network Manager. For example, if the WiFi Name is Tarzan, then look for a file (case sensitive):



            /etc/NetworkManager/system-connections/Tarzan



            In that file, make sure the ipv4 block is like this:



            [ipv4]
            dns=8.8.4.4;8.8.8.8;
            dns-search=
            ignore-auto-dns=true
            method=auto


            replace 8.8.4.4;8.8.8.8; with your DNS servers.



             method=auto


            This instructs NetworkManager to use DHCP to get IP address for the interface.



             ignore-auto-dns=true


            This instructs NetworkManager to ignore the DHCP provided DNS servers.



            That should do the trick.

            You need to do that for every WiFi AP that you connect to.



            PS: Google DNS are 8.8.8.8 , 8.8.4.4






            share|improve this answer

























            • I'm looking forward to try this on my pc!

              – Akane Yoshinega
              Dec 25 '18 at 20:29











            • I edited the server's name in the box "Additional DNS servers", but when I try to do a benchmark with namebench it keeps reporting my old primary server's number instead of the new OpenDNS's one.

              – Akane Yoshinega
              Jan 21 at 11:15











            • @AkaneYoshinega Switch Method to "Automatic (DHCP) addresses only"; the Other (or Additional) DNS Servers will change to DNS Servers. These are the servers then the system will use. I have updated the answer with an image of the window.

              – Domo N Car
              Jan 26 at 14:46













            1












            1








            1







            Does changing DNS result it a more secure web experience?



            Yes, only if you do not trust your network provider. In which case, you can set up DNS. I actually use Google DNS, as this is generally faster.



            Normally OpenDNS and GoogleDNS are faster than provider DNS.



            However, there is a catch. If your network is such that it requires you to login before you can access the internet (like in airports, some cafes, co-working spaces), then they might not work if you overwrite the provider's DNS settings, as their authentication process depends upon DNS.



            There is, however a very good solution available. You setup DNS per connection.



            1. Right click on the network manager icon in the panel and choose "Edit connections..."

            2. Select your connection from the wired or wireless tab, choose "Edit"

            3. (Enter your password if the connection is set as "system-wide available")

            4. Choose IPv4 settings tab

            5. Switch method to "Automatic (DHCP) addresses only"

            6. Enter the name server you want in the box "Additional DNS servers" and press "Apply"

            Network Configuration Window



            Finally, for the command line oriented: Open the connection file in Network Manager. For example, if the WiFi Name is Tarzan, then look for a file (case sensitive):



            /etc/NetworkManager/system-connections/Tarzan



            In that file, make sure the ipv4 block is like this:



            [ipv4]
            dns=8.8.4.4;8.8.8.8;
            dns-search=
            ignore-auto-dns=true
            method=auto


            replace 8.8.4.4;8.8.8.8; with your DNS servers.



             method=auto


            This instructs NetworkManager to use DHCP to get IP address for the interface.



             ignore-auto-dns=true


            This instructs NetworkManager to ignore the DHCP provided DNS servers.



            That should do the trick.

            You need to do that for every WiFi AP that you connect to.



            PS: Google DNS are 8.8.8.8 , 8.8.4.4






            share|improve this answer















            Does changing DNS result it a more secure web experience?



            Yes, only if you do not trust your network provider. In which case, you can set up DNS. I actually use Google DNS, as this is generally faster.



            Normally OpenDNS and GoogleDNS are faster than provider DNS.



            However, there is a catch. If your network is such that it requires you to login before you can access the internet (like in airports, some cafes, co-working spaces), then they might not work if you overwrite the provider's DNS settings, as their authentication process depends upon DNS.



            There is, however a very good solution available. You setup DNS per connection.



            1. Right click on the network manager icon in the panel and choose "Edit connections..."

            2. Select your connection from the wired or wireless tab, choose "Edit"

            3. (Enter your password if the connection is set as "system-wide available")

            4. Choose IPv4 settings tab

            5. Switch method to "Automatic (DHCP) addresses only"

            6. Enter the name server you want in the box "Additional DNS servers" and press "Apply"

            Network Configuration Window



            Finally, for the command line oriented: Open the connection file in Network Manager. For example, if the WiFi Name is Tarzan, then look for a file (case sensitive):



            /etc/NetworkManager/system-connections/Tarzan



            In that file, make sure the ipv4 block is like this:



            [ipv4]
            dns=8.8.4.4;8.8.8.8;
            dns-search=
            ignore-auto-dns=true
            method=auto


            replace 8.8.4.4;8.8.8.8; with your DNS servers.



             method=auto


            This instructs NetworkManager to use DHCP to get IP address for the interface.



             ignore-auto-dns=true


            This instructs NetworkManager to ignore the DHCP provided DNS servers.



            That should do the trick.

            You need to do that for every WiFi AP that you connect to.



            PS: Google DNS are 8.8.8.8 , 8.8.4.4







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 26 at 14:55

























            answered Dec 24 '18 at 19:08









            Domo N CarDomo N Car

            4726




            4726












            • I'm looking forward to try this on my pc!

              – Akane Yoshinega
              Dec 25 '18 at 20:29











            • I edited the server's name in the box "Additional DNS servers", but when I try to do a benchmark with namebench it keeps reporting my old primary server's number instead of the new OpenDNS's one.

              – Akane Yoshinega
              Jan 21 at 11:15











            • @AkaneYoshinega Switch Method to "Automatic (DHCP) addresses only"; the Other (or Additional) DNS Servers will change to DNS Servers. These are the servers then the system will use. I have updated the answer with an image of the window.

              – Domo N Car
              Jan 26 at 14:46

















            • I'm looking forward to try this on my pc!

              – Akane Yoshinega
              Dec 25 '18 at 20:29











            • I edited the server's name in the box "Additional DNS servers", but when I try to do a benchmark with namebench it keeps reporting my old primary server's number instead of the new OpenDNS's one.

              – Akane Yoshinega
              Jan 21 at 11:15











            • @AkaneYoshinega Switch Method to "Automatic (DHCP) addresses only"; the Other (or Additional) DNS Servers will change to DNS Servers. These are the servers then the system will use. I have updated the answer with an image of the window.

              – Domo N Car
              Jan 26 at 14:46
















            I'm looking forward to try this on my pc!

            – Akane Yoshinega
            Dec 25 '18 at 20:29





            I'm looking forward to try this on my pc!

            – Akane Yoshinega
            Dec 25 '18 at 20:29













            I edited the server's name in the box "Additional DNS servers", but when I try to do a benchmark with namebench it keeps reporting my old primary server's number instead of the new OpenDNS's one.

            – Akane Yoshinega
            Jan 21 at 11:15





            I edited the server's name in the box "Additional DNS servers", but when I try to do a benchmark with namebench it keeps reporting my old primary server's number instead of the new OpenDNS's one.

            – Akane Yoshinega
            Jan 21 at 11:15













            @AkaneYoshinega Switch Method to "Automatic (DHCP) addresses only"; the Other (or Additional) DNS Servers will change to DNS Servers. These are the servers then the system will use. I have updated the answer with an image of the window.

            – Domo N Car
            Jan 26 at 14:46





            @AkaneYoshinega Switch Method to "Automatic (DHCP) addresses only"; the Other (or Additional) DNS Servers will change to DNS Servers. These are the servers then the system will use. I have updated the answer with an image of the window.

            – Domo N Car
            Jan 26 at 14:46











            0














            Thank you friends thats work (changed dns ipv4 to google)
            but how tochange ipv6 to google?
            ipv6 tab on ubuntu cinnamon some what diffrent



            i will thank your help.






            share|improve this answer








            New contributor




            yellowchen12P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.
























              0














              Thank you friends thats work (changed dns ipv4 to google)
              but how tochange ipv6 to google?
              ipv6 tab on ubuntu cinnamon some what diffrent



              i will thank your help.






              share|improve this answer








              New contributor




              yellowchen12P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.






















                0












                0








                0







                Thank you friends thats work (changed dns ipv4 to google)
                but how tochange ipv6 to google?
                ipv6 tab on ubuntu cinnamon some what diffrent



                i will thank your help.






                share|improve this answer








                New contributor




                yellowchen12P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                Thank you friends thats work (changed dns ipv4 to google)
                but how tochange ipv6 to google?
                ipv6 tab on ubuntu cinnamon some what diffrent



                i will thank your help.







                share|improve this answer








                New contributor




                yellowchen12P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                yellowchen12P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 2 hours ago









                yellowchen12Pyellowchen12P

                1




                1




                New contributor




                yellowchen12P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                yellowchen12P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                yellowchen12P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f1104303%2fhow-do-i-change-my-dns-on-ubuntu-18-04-which-dns-should-i-use%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

                    Are there any comparative studies done between Ashtavakra Gita and Buddhim?How is it wrong to believe that a self exists, or that it doesn't?Can you criticise or improve Ven. Bodhi's description of MahayanaWas the doctrine of 'Anatta', accepted as doctrine by modern Buddhism, actually taught by the Buddha?Relationship between Buddhism, Hinduism and Yoga?Comparison of Nirvana, Tao and Brahman/AtmaIs there a distinction between “ego identity” and “craving/hating”?Are there many differences between Taoism and Buddhism?Loss of “faith” in buddhismSimilarity between creation in Abrahamic religions and beginning of life in Earth mentioned Agganna Sutta?Are there studies about the difference between meditating in the morning versus in the evening?Can one follow Hinduism and Buddhism at the same time?Are there any prohibitions on participating in other religion's practices?Psychology of 'flow'

                    fallocate: fallocate failed: Text file busy in Ubuntu 17.04? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)defragmenting and increasing performance of old lubuntu system with swap partitionIssue with increasing the root partition from the swapthis /usr/bin/dpkg returned error || ubuntu-16.04, 64bitDefault 17.04 swap file locationHow to Resize Ubuntu 17.04 Zesty Swap file size?Ubuntu freezes from online formsMy Laptop is not starting after upgrade ubuntu 16.04 (Kernel 4.8.0-38 to 04.10.0-36)hcp: ERROR: FALLOCATE FAILED!Not sure my swap is being usedWine 3.0 asking for more virtual free swap

                    Where is the suspend/hibernate button in GNOME Shell? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)No suspend option in UI on Bionic BeaverHow can I set sleep mode in ubuntu18.04 LTS and what is the short cut key to do so?17.10 suspend not availableUbuntu 18.04 LTS missing sleep optionUbuntu 18.04 LTS - missing suspend option when power button is pressedHow to put Thinkpad X1 Extreme to sleep in Ubuntu 18.10?Suspend Button in interactive power button menu18.04 - Keep programs running after logging outway to disable Hibernate from within gconf-editor so button disappears?How can I hibernate from GNOME Shell?How can I hibernate/suspend from the command line and do so at a specific timeNo permission to suspend/hibernate after upgrading to 12.10MATE - Missing Suspend and Hibernate buttons, pressing power button shutdowns system immediatelyUbuntu 14.04: Suspend, Hibernate and Suspend-hybrid in the menu?Change “power-button-action” comand for “hibernate” option in GNOME 3.18Shutdown / Power off button does always go to suspend on 17.10Hibernate after suspend stopped working in 17.10Why doesn't the keyboard screenshot button work on Ubuntu with GNOME shell?