Linux How to..

Linux How to ,Share Knowledge


TAG : Install DNS Server(bind)

==============
install bind
==============
Example Detail :
install dns server for resolve forward record ? : ? ?www.domain.com ?–> 192.168.1.10

yum install -y bind
yum install -y caching-nameserve
r

config named.conf :

vim /var/named/chroot/etc/named.conf

Sample below :

options
{
/* make named use port 53 for the source of all queries, to allow
* firewalls to block all ports except 53:
*/
query-source port 53;
query-source-v6 port 53;

// Put files that named is allowed to write in the data/ directory:
directory “/var/named”; // the default
dump-file “data/cache_dump.db”;
statistics-file “data/named_stats.txt”;
memstatistics-file “data/named_mem_stats.txt”;

};
logging
{
/* If you want to enable debugging, eg. using the ‘rndc trace’ command,
* named will try to write the ‘named.run’ file in the $directory (/var/named).
* By default, SELinux policy does not allow named to modify the /var/named directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file “data/named.run”;
severity dynamic;
};
};
view “default”
{

zone “domain.com” in { type master; file “db.domain.com”; };
};

:wq! ? –> save file named.conf above

vi /etc/sysconfig/named

input line :

ROOTDIR=/var/named/chroot

vim /var/named/chroot/var/named/db.domain.com

$TTL 7200
@ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? IN ? ? ? ? ? SOA ? ? ? ? ? ? ?ns.domain.com. hostmaster.domain.com. (
2012111201 2H 1H 7D 2H )
IN ? ? ? ? ? NS ? ? ? ? ? ? ? ? ns.domain.com.
IN ? ? ? ? ? NS ? ? ? ? ? ? ? ? ns2.domain.com.
IN ? ? ? ? ? A ? ? ? ? ? ? ? ? ? ?192.168.1.10
www ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? IN ? ? ? ? ? A ? ? ? ? ? ? ? ? ? ?192.168.1.10

start named with command
/etc/init.d/named start or service named start

start with restart server ? :
chkconfig named on


  1. blog.up2box.com » Blog Archive » เนื้อหาตามหัวข้อต่างๆ Said,

    […] Install DNS Server(dns+cache) with bind on Linux […]