DNS nameservers (resolvers) provide a way to convert domain names into IP addresses. It is provided by Internet Service Providers (ISP) and can be used by other devices to perform the DNS lookup for the requested domain. All the Xbox users are facing the error of DNS isn’t resolving Xbox server names. Follow the link if you want to solve it.

DNS name servers

This tutorial will demonstrate how to configure or set up the DNS nameserver on Ubuntu using various methods. All configurations were made on Ubuntu 20.04.

There are two ways to set the DNS nameserver on Ubuntu 20.04 Linux:

  • Use the Network Manager to set the DNS NameServer on Ubuntu Desktop
  • Use netplan to set the DNS NameServer command-line

Method 1: Use the Network Manager to set the DNS Name Server on Ubuntu Desktop

The Network Manager makes it easy to set up DNS NameServer on the Ubuntu desktop. It doesn’t require any technical knowledge. Follow the steps below:

  • Open the System “Settings” window.
  • Click on the “wifi tab if you have Wi-Fi. If you don’t have Wi-Fi, click the “Network tab”.
  • You can also launch the Settings window from the top-right menu. Click on the dropdown icon to select “wired settings” from the displaying menu. This option is also shown in this screenshot:
  • To access Network Manager configurations, click on the cog icon located under the heading “wired”.
  • Go to the “IPV4” tab and choose the IPV4 method that defaults to “Automatic (DHCP).”

To disable the automatic button, toggle the switch and enter the DNS address separated by a space to set the DNS nameserver. The screenshot is as follows:

Change DNS Nameserver via Config File

You can also change DNS settings using the command-line Netplan tool if you don’t have a GUI.

  1. Go to the Netplan directory
    cd /etc/netplan.
  2. To see the name and location of the YAML files containing network configuration, list the directory contents using ls
  3. In a text editor, open the file. You may have a file with a different name.
    sudo nano 01-network-manager.
  4. YAML Ethernet connections can be found in the ethernets section. Wireless connections can be found in the wifis section.
  5. Netplan stores current DNS configuration parameters within each subsection of each section.

Replace the addresses in the file with the DNS addresses that you wish to use. You can enter more addresses than one. Save your changes and exit.

SPRING SPECIAL: Get one E-2388G server and one of our select dedicated servers for FREE!
DEPLOY NOW

How to configure DNS Nameserver for Ubuntu 20.04

DNSNAMESERVERSUBUNTU
Home >> SysAdmin >> Setup DNS Nameserver for Ubuntu 20.04

Introduction:

The Domain Name System (DNS), which translates text-based domains to numeric IP addresses, is a part of the Domain Name System (DNS). Most networks work with the DNS servers provided by an internet service provider. Users have the option to modify DNS nameservers.

This tutorial will demonstrate how to modify DNS nameservers on Ubuntu using GUI or the command line.

Prerequisites

  • Ubuntu 20.04 (both methods work on Ubuntu 18.04 or later).
  • Access to the terminal
  • Sudo privileges

Change DNS Nameserver via GUI

Ubuntu Settings is the best way to modify DNS addresses using the graphical user interface.
1. Start Settings and click on the Network tab from the left menu.
2. Click the cogwheel beside the connection you want to establish.
3. Go to the IPv4 tab.
4. Turn off the switch near the DNS field to disable automatic DNS configuration.
5. In the box, type new DNS addresses. This example displays Google’s public DNS nameservers.
6. Click on Apply.

Notice: To set up IPv6 nameservers go to the IPv6 tab. IPv6 addresses are different than IPv4. For example, Google’s IPv6 DNS servers are: 2001:4860:4860::8888 and 2001:4860:4860::8844.

Change DNS Nameserver via Config File

You can also change DNS settings using the command-line Netplan tool if you don’t have a GUI.
1. Go to the Netplan directory
cd /etc/netplan
2. To see the name and location of the YAML files containing network configuration, list the directory contents using ls. In a text editor, open the file. You may have a file with a different name. sudo nano 01-network-manager.YAML Ethernet connections can be found in the ethernets section. Wireless connections can be found in the wifis section.

Netplan stores current DNS configuration parameters within each subsection of each section. Replace the addresses in the file with the DNS addresses that you wish to use. You can enter more addresses than one. Save your changes and exit. Not all sections may be included in the file. If this is the case, you can add the lines missing and make sure to respect the indentation in the example.

3. Make the necessary changes to the config file.
sudo netplan apply
There is no output if the operation succeeds. Type:
system-resolve –status | grep ‘DNS Servers’ -A2
The output shows you the current DNS servers.

Why change DNS nameservers on Ubuntu?

In most cases, default DNS settings provide optimal performance. There are situations where you might want to switch to a third-party DNS provider.

  • Larger companies have better infrastructure and are more likely to provide uninterrupted DNS service. Switching to a DNS provider could be an option if your ISP is not reliable and you have frequent downtimes.
  • Third-party DNS servers may be more efficient than those offered by your ISP.
  • Many DNS providers provide filters to prevent phishing sites from reaching your computer. This same mechanism can also be used to block sensitive information on the internet. This DNS feature is often used by businesses.
  • Internet Service Providers may block content at the DNS level. Switching to another DNS nameserver could help you access geo-restricted sites.

LEAVE A REPLY

Please enter your comment!
Please enter your name here