Linux2013.11.17 14:41

Today, I'm going to build DNS service using BIND9 at Ubuntu.


As you know, BIND9 is so famous DNS service daemon.

and It also famous it's strict grammer. sometimes disgusting to setup.


First of all setup service.

#apt-get install bind9


Files to setup is on "/etc, /etc/bind/" directory.



[hosts]==================================================================================

192.168.0.60 webextest.com apple                                 # Host server IP address, domain, name



[resolv.conf]=============================================================================

nameserver 192.168.0.60                                               # Name server's IP address



[named.conf]=============================================================================

 

zone "webextest.com" {                                              # Inverse zone domain

type master;

file "/etc/bind/webextest.zone";                                   # File name is anything.

};

 

zone "0.168.192.in-addr.arpa" {                                     # Reverse zone domain(192.168.0 input reverse)

type master;

file "/etc/bind/webextest.rev";                                      File name is anything.

 

};


 

[inverse]================================================================================

$TTL 604800

@ IN SOA webextest.com. root.webextest.com. (          # End of the domain, you MUST input "."

   1111 ; Serial                                                           # Input the number not duplicate.

 604800 ; Refresh

  86400 ; Retry

2419200 ; Expire

 604800 ) ; Negative Cache TTL

;

@ IN NS webextest.com.                                              # Domain

@ IN A 192.168.0.60                                                      # Host server address

 

www IN A 192.168.0.60                                                  # Web server address




[reverse]================================================================================

$TTL 604800

@ IN SOA webextest.com. root.webextest.com. (          # End of the domain, you MUST input "."

   2222 ; Serial                                                           # Input the number not duplicate.

 604800 ; Refresh

  86400 ; Retry

2419200 ; Expire

 604800 ) ; Negative Cache TTL

;

@ IN NS webextest.com.                                              # Domain

@ IN A 192.168.0.60                                                      # Host server address

 

60 IN PTR webextest.com.                                            # input last octet of IP

 

 

========================================================================================



After setup, restart service.

#service bind9 restart


now, check the DNS service. 

#nslookup webextest.com

#nslookup 192.168.0.60


and then, check the zone file

#named-checkzone webextest.com webextest.zone

If grammer is correct, you can see OK sign.


Example file is here. refer to this example files.

BIND9 Setup 2.zip

BIND9 Setup.zip



It looks like simple, but It's too strict to setup.

maybe you will meet error message at least one time.


Good luck!

'Linux' 카테고리의 다른 글

Using Cisco Anyconnect on Ubuntu  (0) 2014.04.19
Ubuntu NTP Server Configuration Example  (0) 2014.04.06
Pure-ftpd install and setup at Ubuntu  (0) 2013.11.17
XRDP at Ubuntu  (0) 2013.11.17
Caution command at Ubuntu  (0) 2013.11.17
BIND9 DNS Server setup at Ubuntu  (0) 2013.11.17
Posted by Gomeisa
TAG , ,

댓글을 달아 주세요