make the DNS servers


make the DNS servers - Want make the DNS servers themselves?. This tutorial is made on the distro Ubuntu Server 8.04. Use
Ubuntu 8.04 itself is not without reason. This distribution is one that has been in the LTS version
maintenance for 3 years. Then just check if the package has been installed properly BIND9.
Keep in mind that the DNS Server in Ubuntu package can be selected when first installed.
Can
checked by typing:
sudo apt-cache policy bind9
example on my system:
Aspan @ Aspan-laptop: ~ $ sudo apt-cache policy bind9
[Sudo] password for Aspan:
bind9:
Installed: 1:9.7.0. Dfsg.P1-1ubuntu0.1
Candidate: 1:9.7.0. Dfsg.P1-1ubuntu0.1
Version table:
*** 1:9.7.0. Dfsg.P1-1ubuntu0.1 0
500 http://id.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
100 / var / lib / dpkg / status
1:9.7.0. Dfsg.P1-1 0
500 http://id.archive.ubuntu.com/ubuntu/ lucid / main Packages
Aspan @ Aspan-laptop: ~ $
View Installed line, meaning bind9 is already installed on my system.
If not installed, do the install, update first type:
sudo apt-get update
then install type:
nano sudo apt-get install bind9
After that simply gives a chance, go to the directory bind to first get acquainted with the bind files,
type:
cd / etc / bind /
type:
ls
example on my system:
Aspan @ Aspan-laptop: ~ $ cd / etc / bind
Aspan @ Aspan-laptop :/ etc / bind $ ls
bind.keys db.255 db.ip named.conf named.conf.options
db.0 db.coba db.local named.conf.default-zones rndc.key
db.127 db.empty db.root named.conf.local zones.rfc1918
Aspan @ Aspan-laptop :/ etc / bind $
note file called db.local. Copy the file, type:
sudo cp db.local db.coba
create a file called db.coba, just edited, type:
sudo nano db.coba
it more or less like this:
;
; BIND data file for local loopback interface
;
TTL $ 604,800
@ IN SOA localhost. root.localhost. (
2; Serial
604 800; Refresh
86,400; Retry
2419200; Expire
604 800), Negative Cache TTL
;
@ IN NS localhost.
@ IN A 127.0.0.1
@ IN AAAA :: 1
change to as below:
;
; BIND data file for local loopback interface
;
TTL $ 604,800
@ IN SOA ns.aspan.net. root.aspan.net. (
2; Serial
604 800; Refresh
86,400; Retry
2419200; Expire
604 800), Negative Cache TTL
;
IN NS ns.aspan.net.
IN A 192.168.1.10
ns IN A 192.168.1.10
@ IN AAAA :: 1
www IN CNAME ns
ftp IN CNAME ns
smtp IN CNAME ns
so and so IN CNAME ns
chat IN CNAME ns
Explanation:
No Origin Changes
localhost ns.aspan.net
root.localhost. ns.aspan.net
@ IN NS localhost. IN NS ns.aspan.net.
@ IN A 127.0.0.1 @ IN A 192.168.88.13
(Additional) ns IN A 192.168.88.13
www IN CNAME ns
ftp IN CNAME ns
smtp IN CNAME ns
so and so IN CNAME ns
chat IN CNAME ns
copy files into db.ip db.coba, type:
sudo cp db.coba db.ip
edit, type:
sudo nano db.ip
;
; BIND data file for local loopback interface
;
TTL $ 604,800
@ IN SOA ns.aspan.net. root.aspan.net. (
2; Serial
604 800; Refresh
86,400; Retry
2419200; Expire
604 800), Negative Cache TTL
;
@ IN NS ns.aspan.net.
13 IN PTR ns.aspan.net.
ns IN A 192.168.88.13
@ IN AAAA :: 1
Explanation:
13 is the host ID of the IP address of the DNS Server
then edit the named.conf file, type:
sudo nano named.conf
it more or less like this:
/ / Prime the server with knowledge of the root servers
zone "." {
type hint;
file "/ etc / bind / db.root";
};
/ / Be authoritative for the localhost forward and reverse zones, and for
/ / Broadcast zones as per RFC 1912
zone "aspan.net" {
type master;
file "/ etc / bind / db.coba";
};
zone "88.168.192.in-addr.arpa" {
type master;
file "/ etc / bind / db.ip";
};
zone "0.in-addr.arpa" {
type master;
file "/ etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/ etc/bind/db.255";
};
restart bind9 service type:
sudo / etc/init.d/bind9 restart
then make all clients use DNS we have made. If the DNS IP on Linux systems
We could server entries in the file / etc / resolv.conf, type:
sudo nano / etc / resolv.conf
search aspan.net
nameserver 192.168.88.13
if using a network manager please see screenshot:
test domain with the command:
dig-x aspan.net
; << >> DIG 9.7.0-P1 << >>-x aspan.net
;; Global options: + cmd
;; Got answer:
;; - >> HEADER << - opcode: QUERY, status: NXDOMAIN, id: 15242
;; Flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
; Net.aspan.in-addr.arpa. IN PTR
;; AUTHORITY SECTION:
in-addr.arpa. 10800 IN SOA A.ROOT-SERVERS.NET. dns-ops.ARIN.NET.
2011021110 1800 900 691200 10800
;; Query time: 258 msec
;; SERVER: 192.168.1.10 # 53 (192.168.1.10)
;; WHEN: Sat February 12 00:15:36 2011
;; MSG SIZE rcvd: 107......
Related : make the DNS servers.