ក្រុមការងារយើងខ្ញុំនិងខិតខំសិក្សារស្រាវជ្រាវចំនេះដឹងបន្ថែមទៀតសំរាប់លោកអ្នក សូមអរគុណសំរាប់ការគាំទ្រ !

Linux DNS Server Configuration

Linux DNS Server Configuration
View video : link 

3 DNS server
- Recursive = Caching server = Resolver = answer query direct for client   : answer to client
- Interative  = forwarder = continue query to other dns server: root, TID server
- Authorize  = answer domain : Ex . yahoo.com
DNS server: translate domain name : yahoo.com to IP address

. = root dns server = 12 servers
TLD = Top Level Domain DNS server :  .com, .org .edu

SLD = Secondary level domain : itgrooupkh, yahoo,  facebook

Mail.yahoo.com

Record:   A: point hostname to IP
mail.google.com to 202.1.2.3 = Record
www.google.com to 203.1.2.3 = A record
============================
DNS server : have 2 zones
-Forward zone 
   A : point hostname to IP , www.mail.yahoo.com to 203.1.2.3
   NS : point to name server , ns.yahoo.com to 203.1.2.3.
   MX : ponit to mail server , mx.1.online.com.kh to 203.168.128.2
   CNAME : point alias name to hostname to mx1.online.com.kh   -> mail.online.com.kh

-Reverse zone :  For security
PTR : IP to hostname: 203.1.2.3 to www.yahoo.com

TTL = Time to live; during



Command configure DNS:

1/Install DNS Package
#yum -y install bind

2/ Create DNS Zone
#vi /etc/named.conf
options {
         liststen-on port 53 { 127.0.0.1; 192.168.1.254;}
         allow-query  {localhost; 192.168.1.0/24;};
    };
zone "test.local"IN {
           type master;
           file "1.168.192.local.db";
           allow-update {none; };
};
zone "1.168.192 in-addr.in-addr.arpa.local"IN {
           type master;
           file "1.168.192.local.db";
           allow-update {none; };
};
# cd /var/named/
#ll
#cp named.localhost test.local.db
#cp named.loopback 1.168.192.in-addr.arpa.local.db
#ll
3/ Create Zone file
#vi /var/named/test.local.db
#vi /var/named/1.168.192.local.db

4/ verify/Restart service
#named-checkconf /etc//named.conf
#named-checkzone itgroupkh.local /var/named/itgroupkh.local.db
#service named restart
#service name status
#chkconfig named on

5/ Allow permission & Firewall
#chgrp named -R /var/named
#chown root:named /etc/named.conf
#firewall-cmd --permanent --zone=public --add-port=53/tcp
#firewall-cmd --permanent --zone=public --add-port=53/udp

6/ Test DNS
#nslookup (yum -y nstall bind-utils)

>ns1.test.local


EmoticonEmoticon