The software described in this documentation is either in Extended Support or Sustaining Support. See https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdf for more information.
Oracle recommends that you upgrade the software described by this documentation as soon as possible.

13.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:

    DNS1=127.0.0.1

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

    nameserver 127.0.0.1

    This entry points the resolver at the local name server.

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

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

  4. Allow incoming TCP connections to port 53 and incoming UDP datagrams on port 53 from the local network:

    # iptables -I INPUT -s subnet_addr/prefix_length -p tcp \
      -m state --state NEW -m tcp --dport 53 -j ACCEPT
    # iptables -I INPUT -s subnet_addr/prefix_length -p udp \
      -m udp --dport 53 -j ACCEPT
    # service iptables save

    where subnet_addr/prefix_length specifies the network address, for example 192.168.1.0/24.

  5. Restart the network service, restart the named service, and configure named to start following system reboots:

    # service network restart
    # service named start
    # chkconfig named on