Difference between revisions of "Cluster der kan alt/DNS Server"
From Teknologisk videncenter
(→Step six: Test our new domain and DNS entries) |
|||
Line 1: | Line 1: | ||
=Installation af DNS= | =Installation af DNS= | ||
− | + | Instruktioner | |
− | == | + | ==Installer DNS Server== |
sudo apt-get install bind9 | sudo apt-get install bind9 | ||
==configure DNS (Bind)== | ==configure DNS (Bind)== | ||
− | + | Vi skal bruge 5 filer. | |
We will edit 3 files. | We will edit 3 files. |
Revision as of 09:36, 19 April 2012
Installation af DNS
Instruktioner
Installer DNS Server
sudo apt-get install bind9
configure DNS (Bind)
Vi skal bruge 5 filer.
We will edit 3 files.
- /etc/bind/named.conf.local
- /etc/bind/named.conf.options
- /etc/resolv.conf
We will create 2 files.
- /etc/bind/zones/mydomain.com.db
- /etc/bind/zones/rev.0.168.192.in-addr.arpa
First step: add domain zone – mydomain.com
- sudo vi /etc/bind/named.conf.local
# Our Domain zone
zone "dka.local." {
type master;
file "/etc/bind/zones/dka.local.db";
};
# For reverse DNS
zone "0.0.10.in-addr-arpa" {
type master;
file "/etc/bind/zones/rev.0.0.10.in-addr.arpa";
};
Secund step: Add the DNS servers from your ISP
- Sudo vi /etc/bind/named.conf.options
forwarders {
172.16.4.66;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
listen-on { any; };
allow-query { 127.0.0.1; 172.16.4.66/24; 10.0.0.0/24;};
};
===Third step: Modify the resolv.conf file
$ Sudo vi /etc/resolve.conf
search dka.dk.
nameserver 10.0.0.1
Fourth step: Define zones
Sudo mkdir /etc/bind/zones Sudo vi /etc/bind/zones/dka.dk.db
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.dka.local. root.dka.local. (
8 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.dka.local.
ns IN A 10.0.0.1
ubuntu IN A 10.0.0.21
The TTL or time to live is set for 3 days
The ns.mydomain.com nameserver is defined
ubuntudesktop, pc and gateway are entered as an A record
An alias of www is assigned to ubuntudesktop using CNAME
Step five: Create a “rev.0.168.192.in-addr.arpa” file for reverse lookup
Sudo vi /tec/bind/zones/rev.0.168.192.in-addr.arpa
$TTL 3D
@ IN SOA ns.dka.local. admin.dka.local. (
2007062001
28800
604800
604800
86400
)
IN NS ns.dka.local.
2 IN PTR ubuntu.dka.local
Step seks: Test vores nye domæne og DNS entries
Dig
$ dig dka.local
Nslookup
nslookup ns