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 bind
If
NetworkManager
is enabled on the system, edit the/etc/sysconfig/network-scripts/ifcfg-
file, and add the following entry:interface
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 thenameserver 127.0.0.1
entry.If required, modify the
named
configuration 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 save
where
subnet_addr
/
prefix_length
specifies the network address, for example192.168.1.0/24
.Restart the
network
service, restart thenamed
service, and configurenamed
to start following system reboots:#
service network restart
#service named start
#chkconfig named on