This document describes how to set up a forwarding-only Domain Name System (DNS) server on an Elemental Linux Server (ELS) machine using BIND.
You will need to have the ELS 'Extra Applications' CD-ROM mounted on /media/cdrom.
The following instructions describe how to install BIND using the ELS CD-ROM.
The example below shows how you would install version 9.9.1-P1 of BIND from the ELS CD-ROM.
cd / tar -zxf /mount/cdrom/extra/bind-9.9.1-P1.i586.tar.gz cd /opt/bin ln -s ../bind-9.9.1-P1/bin/* . cd /opt/sbin ln -s ../bind-9.9.1-P1/sbin/* .
After installing BIND, follow the steps below to configure a forwarding-only name server.
The example below shows portions of the namd.conf and firewall files that have been changed as well as the commands used to set named for automatic start-up.
mkdir /etc/opt/bind
vi /etc/opt/bind/named.conf
options {
directory "/etc/opt/bind";
forwarders {
10.10.10.53;
10.10.11.53;
};
};
vi /etc/firewall
-A INPUT -p udp -s 10.10.10.53 --sport 53 --dport 1024:65535 -j ACCEPT
-A INPUT -p udp -s 10.10.11.53 --sport 53 --dport 1024:65535 -j ACCEPT
/etc/init.d/network restart
chmod +x /etc/init.d/named
The IP addresses shown are for demonstration purposes only and should be changed to match your network configuration.
You can test your setup by performing some DNS queries.
Here is an example of a successful test.
login: root password: # /etc/init.d/named start DNS server is starting. # nslookup > server 127.0.0.1 Default server: 127.0.0.1 Address: 127.0.0.1#53 > www.ibiblio.org Server: 127.0.0.1 Address: 127.0.0.1#53 Non-authoritative answer: Name: www.ibiblio.org Address: 152.46.7.80 > 152.46.7.80 Server: 127.0.0.1 Address: 127.0.0.1#53 Non-authoritative answer: 80.7.46.152.in-addr.arpa name = ibiblio.org. 80.7.46.152.in-addr.arpa name = ibiblio.unc.edu.
If your test was not successful, here are some troubleshooting tips.
Once BIND is set up, you can edit /etc/resolv.conf and instruct the ELS system to use itself (127.0.0.1) for DNS lookups. You can also configure any workstations on your network to use the ELS machine as a DNS server.