Skip to content

Configuring DNS on Linux VMs

DNS translates domain names into IP addresses. Linux VMs need working DNS nameserver configuration to resolve domains and communicate with network services.

This guide covers Ubuntu, CentOS, RHEL, and Oracle Linux.

Prerequisites

Before configuring DNS nameservers, make sure you have:

  • Administrative privileges through sudo or root access.
  • DNS nameserver IP addresses.

Use these SITE Cloud DNS nameservers:

100.64.3.140
100.80.0.175

Configure Nameservers

  1. Open a terminal.
  2. Edit /etc/netplan/99-netcfg-vmware.yaml using a text editor such as nano or vim.
  3. Add the nameservers under addresses:
nameservers:
  addresses: [100.64.3.140, 100.80.0.175]
  1. Save the file.
  2. Apply the configuration:
sudo netplan apply

Review before applying

Review the Netplan file before applying changes. A syntax error may disrupt network connectivity.

  1. Open a terminal.
  2. Edit /etc/resolv.conf using your preferred text editor.
  3. Add the DNS nameservers at the top of the file:
nameserver 100.64.3.140
nameserver 100.80.0.175
  1. Save the file.

Verifying DNS Resolution

[ADD CONTENT: No existing content in current documentation.]

Safety and Security

Follow these safety practices:

  • Use trusted DNS servers, such as SITE Cloud DNS.
  • Avoid DNS servers from untrusted sources.
  • Double-check configuration before applying changes.
  • Keep the system and software updated.
  • Maintain firewall rules that restrict DNS access to trusted networks.
  • Consider DNSSEC to validate DNS responses.