12.4 Configuring a Name Server

By default, the BIND installation allows you to configure a caching-only name server using the configuration settings that are provided in /etc/named.conf and files that it includes. This procedure assumes that you will either use the default settings or configure new named configuration and zone files.

To configure a name server:

  1. Install the bind package:

    # yum install bind
  2. If NetworkManager is enabled on the system, edit the /etc/sysconfig/network-scripts/ifcfg-interface file, and add the following entry:


    This line causes NetworkManager to add the following entry to /etc/resolv.conf when the network service starts:


    This entry points the resolver at the local name server.

    If you have disabled NetworkManager, edit /etc/resolv.conf to include the nameserver entry.

  3. If required, modify the named configuration and zone files.

  4. Configure the system firewall to allow incoming TCP connections to port 53 and incoming UDP datagrams on port 53:

    # firewall-cmd --zone=zone --add-port=53/tcp --add-port=53/udp
    # firewall-cmd --permanent --zone=zone --add-port=53/tcp --add-port=53/udp
  5. Restart the network service, restart the named service, and configure named to start following system reboots:

    # systemctl restart network
    # systemctl start named
    # systemctl enable named