Install DNS Server BIND
| 
1 | $ sudoapt-get installbind9 | 
IP Address yang saya gunakan
192.168.1.1 dengan nama domain ubuntu.lanTambahkan script di bawah ini :
| 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 | zone "ubuntu.lan"{ typemaster; file"/etc/bind/db.ubuntu";};zone "1.168.192.in-addr.arpa"{ typemaster; notify no; file"/etc/bind/db.1";};   | 
zone "1.168.192.in-addr.arpa" { ditulis terbalik.Copy file db.local
| 
1 
2 | # cp db.local db.ubuntu # cp db.local db.1 | 
| 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 | ;; BIND data fileforlocalloopback interface;$TTL    604800@   IN  SOA ns.ubuntu.lan. root.ubuntu.lan. (                  2     ; Serial             604800     ; Refresh              86400     ; Retry            2419200     ; Expire             604800 )   ; Negative Cache TTL;@   IN  NS  ubuntu.lan.@   IN  A   192.168.1.1ns  IN  A   192.168.1.1www IN  CNAME   ubuntu.lan. | 
| 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 | ;; BIND data fileforlocalloopback interface;$TTL    604800@   IN  SOA ns.ubuntu.lan. root.ubuntu.lan. (                  2     ; Serial             604800     ; Refresh              86400     ; Retry            2419200     ; Expire             604800 )   ; Negative Cache TTL;@   IN  NS  ubuntu.lan.1   IN  PTR ubuntu.lan.ns  IN  PTR 192.168.1.1www IN  PTR 192.168.1.1 | 
| 
1 
2 
3 | # nano /etc/network/interfacesdns-nameservers 192.168.1.1dns-search ubuntu.lan | 

Pengujian
| 
1 
2 
3 
4 
5 
6 
7 | $ nslookupubuntu.lannslookupubuntu.lanServer:     192.168.1.1Address:    192.168.1.1#53Name:   ubuntu.lanAddress: 192.168.1.1 | 
| 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 | $ digubuntu.lan; <<>> DiG 9.8.1-P1 <<>> ubuntu.lan;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58799;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0;; QUESTION SECTION:;ubuntu.lan.            IN  A;; ANSWER SECTION:ubuntu.lan.     604800  IN  A   192.168.1.1;; AUTHORITY SECTION:ubuntu.lan.     604800  IN  NS  ubuntu.lan.;; Query time: 6 msec;; SERVER: 192.168.1.1#53(192.168.1.1);; WHEN: Sun Sep  9 08:00:55 2012;; MSG SIZE  rcvd: 56 | 
http://ubuntu.lanselamat mencoba
 



 






 
 








0 komentar:
Posting Komentar