Trillex installing dns

From Teknologisk videncenter
Revision as of 11:20, 17 February 2009 by Trillex (talk | contribs)
Jump to: navigation, search

Installing and Configuring a Linux DNS server with zone file

Please note that this is done on a Ubuntu server. It can and probably will differ depending on the distro used.

Installing the DNS Daemon (Bind9)

Bind9 (Or generally bind) is the standard DNS server daemon for Linux. Install it by typing:

sudo apt-get install bind9

This will install the program. Wait for it.

Configuring the DNS Daemon (Bind9)

You will need to set up the DNS domain name as well as a DNS forwarder.

Domain Name

Domain name can can be changed in the file /etc/bind/named.conf.local Right now the file is either blank or filled out with a lot of commented lines. Just delete them all and insert this:

# This is the zone definition. replace example.com with your domain name
zone "example.com" {
       type master;
       file "/etc/bind/zones/example.com.db";
       };
# This is the zone definition for reverse DNS. replace 0.168.192 with your network address in reverse notation - e.g my network address is 192.168.0
zone "0.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";
};

Replace example.com with your own domain name (I chose trillex.dk). Also change the "reverse DNS" with your IP. Remember to do it backwards, as explained in the comments. What it essentially does is point towards the zone files it will use.

DNS Forwarder

Since, on this school, we are stuck behind a "master" server, we will need to add that DNS as a forwarder so we can actually get responses back.