3

I would like to change the DNS server for my Kubuntu computer so I can do anything while surfing the web.

Can someone please help show me how it is done?

1
  • If "my uncle did it before but wont tell me how to change the DNS on my Kubuntu computer so i can do anything while surfing the web", then he probably did it for a good reason (like keeping you from visiting specific web sites), and without knowing how/where he did that, it's difficult to come up with a solution. – heynnema Jun 4 '19 at 14:50
5

The simplest way to set your own DNS servers is shown below. (This may, or may not, solve your problem, as we don't know what changes your Uncle made to limit your Internet access.)

enter image description here

1

If you want to use a specific DNS server, you can set up your network connections manually.

These options are under System Settings > Network > Connections.

Open the individual settings for your network. You will want to make the following changes to your IPv4 and IPv6 settings.

  • Change Method to "Manual".

  • Put the IP address of your desired DNS server under DNS Servers. Cloudflare Privacy DNS (1.1.1.1) is used here as an example.

In the box below, "Add" your computer's local IP address:

  • Address is the local IP address for your device (your computer). If you don't know it, type ip address into a terminal. Your local IP address will be one of the ones listed after the word inet and will have an address in the DCHP reservation block for your router.

  • Netmask should default to 255.255.255.0

  • Gateway is the IP address of your router (or whatever device on your network handles DHCP and assigns a local IP address to your device)

  • Select "IPv4 is required for this connection" if you want to restrict access to IPv4 only. Otherwise you will need to set up the IPv6 tab using IPv6 type addresses.

  • Accept these new settings, then open a terminal and run sudo service network-manager restart or just reboot your computer.

image of settings screen


It is recommended that you set a DHCP reservation on your router to match the local IP address you entered. Otherwise, your local IP address can change and these settings would need to be changed each time. You will need to consult the documentation for your router if you wish to do this.

4
  • This is wrong. You do NOT need to make a manual connection profile to set DNS servers. – heynnema Jun 4 '19 at 14:53
  • If would be better if you showed how to do it with either normal dhcp settings, or with Address Only settings. It may be called something slightly different in Kubuntu. – heynnema Jun 4 '19 at 18:05
  • I don't use Kubuntu, so I can't get screenshots to demonstrate. And you're correct, there's usually more than one way to do something. Your way requires OP to determine a valid static IP and hope it's valid tomorrow, and the OP may not know how to do that. Plus, they probably use auto/dhcp settings now, so there's little difficulty with the slight change of adding DNS servers... if one decides to do it that way. There are other ways too... :-) – heynnema Jun 4 '19 at 20:26
  • One thing that you always need to consider when making any answer is "how easy is my answer to understand by the original poster, and how easy is it to implement, and without difficulty". In your answer, chances for the OP (original poster) to make a simple mistake... like using an already used static IP address... can bring down a network. That's an error that you don't want to happen. My answer poses no risks for errors. I have no desire to be condescending or overly critical, but mostly just informational and factual. Can we still be friends :-) – heynnema Jun 4 '19 at 23:22
0

On my system I found I had to edit /etc/resolv.conf each time after the connection was established.

Not ideal, but it worked.

I ran nslookup google.com to check which DNS server was being used before and after editing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.