Konfigurasi DNS Server Untuk Intranet dan Internet dengan Bind

Posted on June 20th, 2007 by id_provoke.
Categories: Linux.

Buat DNS server untuk Intranet dan Internet pada satu dns server
menggunakan bind dengan sintak view.
Sehingga pada saat query dilihat dari source ipnya, untuk localnet
akan mendapatkan query domain suhatman.com yang inside, dan untuk
yang melakukan query dari internet akan mendapatkan record domain
suhatman.com yang outside.

Berikut konfigurasi named.conf

#konfigurasi untuk localnet

acl localnet {
192.168.1.0/24;
127.0.0.1;
};

options {
directory “/var/named”;
dump-file “/var/named/data/cache_dump.db”;
statistics-file “/var/named/data/named_stats.txt”;
allow-transfer { localnet; };
allow-query { localnet; };
};

view “inside”{
match-clients { localnet; };
recursion yes;

zone “.” IN {
type hint;
file “named.ca”;
};

zone “localhost” IN {
type master;
file “localhost.zone”;
allow-update { none; };
};

zone “0.0.127.in-addr.arpa” IN {
type master;
file “named.local”;
allow-update { none; };
};

zone “suhatman.com” IN {
type master;
file “suhatman.com.inside”;
allow-update { none; };
};
};

view “outside”{
match-clients { any; };
allow-query { any; };
recursion no;

zone “suhatman.com” IN {
type master;
file “suhatman.com.outside”;
allow-update { none; };
};
};

Untuk konfigurasi suhatman.com.inside

$TTL 86400
@ IN SOA ns.suhatman.com. henry.suhatman.com. (
2007062000 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS ns1.suhatman.com.
@ IN NS ns2.suhatman.com.
@ IN MX mail.suhatman.com.
@ IN MX mail2.suhatman.com.
@ IN A 192.168.1.1
ns1 IN A 192.168.1.1
ns2 IN A 192.168.1.2
www IN A 192.168.1.1
mail IN A 192.168.1.1
mail2 IN A 192.168.1.1
webmail IN A 192.168.1.1
smtp IN A 192.168.1.1
pop IN A 192.168.1.1

Untuk konfigurasi suhatman.com.outside

$TTL 86400
@ IN SOA ns.suhatman.com. henry.suhatman.com. (
2007062000 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS ns1.suhatman.com.
@ IN NS ns2.suhatman.com.
@ IN MX mail.suhatman.com.
@ IN MX mail2.suhatman.com.
@ IN A 202.43.162.30
ns1 IN A 202.43.162.30
ns2 IN A 202.78.199.217
www IN A 202.43.162.30
mail IN A 202.43.162.30
mail2 IN A 202.78.199.217
webmail IN A 202.43.162.30
smtp IN A 202.43.162.30
pop IN A 202.43.162.30

gut lak!!

1 comment.

Comment on April 3rd, 2008.

I had easy time reading your blog. But it seems now it’s over :(. Man, this post sucks. I hope at least the next one won’t be.

Leave a Comment

Names and email addresses are required (email addresses aren't displayed), url's are optional.

Comments may contain the following xhtml tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>