Editing configuration files in Linux can be a daunting task for a person that is new to the whole concept. I do it when I have to and have done it a lot over the years. But unlike some people that almost fall in love with the command line interface (CLI), I like it less and less as the time passes. I prefer to use my time on other things than administrating and configuring the server. Once it is done, it should just work. And this makes CLI very difficult because I never remember the commands when I need them. So I have to search the internet every time.
When I have to do it, my editor of choice is nano. So to edit a file, I type
sudo nano filename.txt
The reason for the sudo is that most of the files that needs to be edited will be outside of the home directory and because of this, not possible to edit with normal user privileges. Adding sudo and giving your password takes care of that.
Checking basic server configuration
First of all, it is a good idea to check that the standard stuff of the server has been configured correct after bind9 has been installed. The first file to check would be the basic networking configuration on your server:
sudo nano /etc/network/interfaces
Mine looks like this:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 10.11.12.100 netmask 255.255.255.0 network 10.11.12.0 broadcast 10.11.12.255 gateway 10.11.12.1
Yours might differ, but this one should get you what you need.
Your server needs to know a DNS in order to look up requests. Of course, as you will have a DNS running locally, you just have to point it to itself.
sudo nano /etc/resolv.conf
My server only has two lines here. One for the DNS, the other for the domain.
search lan1.domainname.com nameserver 127.0.0.1
The hosts file could do the job as a simple “DNS”, but as we are setting up a complete DNS, it is better to keep it clean:
sudo nano /etc/hosts
Something similar to this is ok, nothing else should be needed:
127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
In the last post I will cover the bind9 specific configuration.
The photograph of the web is copyright Svein Wisnæs.