# Adding Additional DNS Entries for the Nodes

When you set up the nodes, you can configure up to three DNS entries for each node. Use the following steps to add additional DNS entries to a node.

## Procedure

1. Log in to the node and edit the following file:

       /etc/dnsmasq.conf

2. Add the DNS entries/nameservers, as shown in the following example:

       server=172.18.229.167
       server=172.18.129.161
       server=172.18.59.7
       server=8.8.8.8
       server=4.4.4.4

3. Update `/etc/resolv.conf` to use the local name server as follows:

        # chattr -i /etc/resolv.conf
       vi /etc/resolv.conf (or edit the file using any text editor)

   Remove the existing entries and add the following line:

       nameserver 127.0.0.1

   Save the file, and then run the following commands:

       # chattr +i /etc/resolv.conf
       # systemctl restart dnsmasq

4. Check `/var/log/messages` to verify that all configured nameservers are listed, as shown in the following example:

       Sep 16 15:35:01 [localhost] systemd: Stopped DNS caching server..
       Sep 16 15:35:01 [localhost] systemd: Started DNS caching server..
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: started, version 2.76 cachesize 150
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: compile time options: IPv6 GNU-getopt DBus no-i18n IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 4.4.4.4#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 8.8.8.8#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 172.18.59.7#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 172.18.129.161#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 172.18.229.167#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: reading /etc/resolv.conf
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 4.4.4.4#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 8.8.8.8#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 172.18.59.7#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 172.18.129.161#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: using nameserver 172.18.229.167#53
       Sep 16 15:35:01 [localhost] dnsmasq[25930]: ignoring nameserver 127.0.0.1 - local interface

×

Loading...