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.
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:
Install the bind package:
#
yum install bindIf
NetworkManageris enabled on the system, edit the/etc/sysconfig/network-scripts/ifcfg-file, and add the following entry:interfaceDNS1=127.0.0.1
This line causes
NetworkManagerto add the following entry to/etc/resolv.confwhen 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.confto include thenameserver 127.0.0.1entry.If required, modify the
namedconfiguration and zone files.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 savewhere
subnet_addr/prefix_lengthspecifies the network address, for example192.168.1.0/24.Restart the
networkservice, restart thenamedservice, and configurenamedto start following system reboots:#
service network restart#service named start#chkconfig named on

