SDB:Configure DNS

Jump to: navigation, search

Usually when you connect to internet, you will be automatically assigned a DNS server to resolve domain names. However, these DNS servers, provided by your ISP, can be very slow! Each time you open a new website, it wastes several seconds to look up domain names. Another reason that you won't want to use default DNS servers is that they may censor what websites you visited and prevent you accessing some services.

Here are several public DNS known to be faster and safer, like OpenDNS, Cloudflare DNS, Google DNS. This article introduces how to configure your DNS. You can choose whatever DNS server you like. However, be aware that a DNS server can record all sites you visit, so don't use any DNS servers that you cannot trust!

Method 1: Use NetworkManager applets

  1. In your panel or system tray, click the network icon.
  2. Click Configure network connection.
  3. Choose the connection.
  4. In IPv4 tab, type 1.1.1.1,1.0.0.1 in Other DNS Servers field.
  5. In IPv6 tab, type 2606:4700:4700::1111,2606:4700:4700::1001 in Other DNS Servers field.
  6. Save connection.
  7. As NetworkManager in OpenSUSE uses netconfig DNS settings, you need to edit /etc/NetworkManager/NetworkManager.conf and add following lines:
[main]
rc-manager=file
  1. Disconnect and reconnect.

This change only apply to specific connection, not globally.

Method 2: Use YaST (without NetworkManager)

If you are using NetworkManager (see more), YaST won't allow you to modify DNS.
  1. Open YaST.
  2. Enter Network Settings.
  3. Open Hostname/DNS tab.
  4. Fill Nameserver 1/2/3 with 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111

This change is global.

Method 3: Edit configuration file (without NetworkManager)

If you are using NetworkManager(see more), content of /etc/resolv.conf will be overridden by NetworkManager frequently so it won't work.
  1. Open /etc/resolv.conf.
  2. Add the following lines
nameserver 1.1.1.1
nameserver 1.0.0.1
nameserver 2606:4700:4700::1111
nameserver 2606:4700:4700::1001

This change is global.