Difference between revisions of "Cluster der kan alt/DNS Server"
From Teknologisk videncenter
(→Installation af DNS) |
(→Installation af DNS) |
||
Line 52: | Line 52: | ||
<source lang=cli> | <source lang=cli> | ||
− | search | + | search dka.dk. |
− | nameserver | + | nameserver 10.0.0.1 |
</source> | </source> | ||
+ | |||
+ | ===Fourth step: Define zones=== | ||
+ | |||
+ | Sudo mkdir /etc/bind/zones | ||
+ | Sudo vi /etc/bind/zones/dka.dk.db | ||
+ | |||
+ | <source lang=cli> | ||
+ | $TTL 3D | ||
+ | @ IN SOA ns.mydomain.com. admin.mydomain.com. ( | ||
+ | 2007062001 | ||
+ | 28800 | ||
+ | 3600 | ||
+ | 604800 | ||
+ | 38400 | ||
+ | ); | ||
+ | mydomain.com. IN NS ns.mydomain.com. | ||
+ | ubuntudesktop IN A 192.168.0.10 | ||
+ | www IN CNAME ubuntudesktop | ||
+ | pc IN A 192.168.0.11 | ||
+ | gw IN A 192.168.0.1 | ||
+ | TXT "Network Gateway" | ||
+ | </source> | ||
+ | |||
{{Source cli}} | {{Source cli}} | ||
[[Category:Cliuster]][[Category:Ubuntu]] | [[Category:Cliuster]][[Category:Ubuntu]] |
Revision as of 12:14, 18 April 2012
Contents
Installation af DNS
Instructions
Install DNS sserver software
sudo apt-get install bind9
configure DNS (Bind)
We need to touch 5 files.
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 "mydomain.com" {
type master;
file "/etc/bind/zones/mydomain.com.db";
}
# For reverse DNS
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";
}
Secund step: Add the DNS servers from your ISP
- Sudo vi /etc/bind/named.conf.options
Forwarders {
x.x.x.x
};
===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
$TTL 3D
@ IN SOA ns.mydomain.com. admin.mydomain.com. (
2007062001
28800
3600
604800
38400
);
mydomain.com. IN NS ns.mydomain.com.
ubuntudesktop IN A 192.168.0.10
www IN CNAME ubuntudesktop
pc IN A 192.168.0.11
gw IN A 192.168.0.1
TXT "Network Gateway"