Instalare BIND in CentOS 6

Configurare noua (How To)

Situatie

Solutie

Aceasta este o solutie care va va ajuta sa configurati un nameserver pentru domeniul dumneavoastra.

yum update -y

yum install bind bind-utils -y

nano -w /etc/named.conf

In fisierul de configuratie vom adauga ce este ingrosat :

options { #listen-on port 53 { 127.0.0.1; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { any; }; allow-transfer { localhost; 2.2.2.2; }; recursion no; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic"; };

Vom adauga o intrare noua la sfarsitul fisierului named.rfc1912.zones in formatul:

zone "localhost.localdomain" IN {
 type master; 
 file "named.rfc1912.local"; 
};

Vom creea forward zone-ul domeniului in directorul /var/named 
(director ce este configurat in named.conf)
nano -w /var/named/mydomain.com.zone

$TTL 86400 @ IN SOA ns1.mydomain.com. root.mydomain.com. 
                                        2013042201 
                                              3600 ;
                                              1800 ;
                                            604800 ;
                                             86400 ;
 ; Specify our two nameservers 
IN NS ns1.mydomain.com. 
IN NS ns2.mydomain.com. 
; Resolve nameserver hostnames to IP, replace with your two droplet IP addresses. 
ns1 IN A 1.1.1.1 
ns2 IN A 2.2.2.2 
; Define hostname -> IP pairs which you wish to resolve 
@ IN A 3.3.3.3 
www IN A 3.3.3.3
 
service named restart

Tip solutie

Permanent

Voteaza

(16 din 29 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?