Change DNS Servers on Linux Host

Problem

  • The nameserver IPs need to be modified on Linux host.
  • Need to change the IP to the DNS resolvers.

Environment

  • Platform9 Managed OpenStack - v3.6.0 and Higher
  • CentOS 7.x
  • Ubuntu 16.04

Procedure

CentOS 7.x

  1. Modify the value to the directive nameserver in /etc/resolv.conf.

Note: Restart of network or services is not needed.

Ubuntu 16.04

  1. Add/modify the directive dns-servers in /etc/network/interfaces.
  2. Reload the network configuration.
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard