configurar servidor dns bind

1. configurar servidor dns bind

maykel resende
sgtmaykel

(usa Linux Mint)

Enviado em 03/09/2013 - 16:08h

boa tarde estou com problemas com um trabalho da faculdade, onde tenho que montar uma vm1 com o servidor dns instalado, configurado como mestre de 2 dominios e como servidor dns de vm2 e vm3. uma vm2 com o servidor http, configurado para atender os 2 dominios e cada dominio com pelo menos uma pagina, e uma vm3 como cliente dns e http para os teste.
estou usando o mint-cinnamon-15-32 bits nas maquinas virtuais em vmware
a vm1 que rodará o serviço dns possui ip 192.168.134.150
a vm2 que rodara o serviço http possui ip 192.168.134.152
a vm3 que sera cliente dns e http possui ip 192.168.134.151

para instalar o serviço dns usei o comando apt-get install bind9

para instalar o serviço http usei o comando apt-get install apache2 e apt-get install php5

tentei configurar a vm1 (dns) e peguei alguns tutoriais cada um com uma configuração diferente testei um porem a resposta que obtive foi:


os meus arquivos de configuração ficaram da seguinte forma configurados:

maykel-virtual-machine bind # cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.134.150
search maykel.com.br

# OpenDNS Fallback (configured by Linux Mint in /etc/resolvconf/resolv.conf.d/tail).
nameserver 208.67.222.222
nameserver 208.67.220.220


maykel-virtual-machine cache # cat /etc/bind/named.conf.local
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

## minhas zonas ##
zone "maykel.com.br"{
type master ;
file "db.maykel.com.br";
};

## reverso da rede 192.168.134.0
zone "134.168.192.in_addr.arpa"{
type master;
file "db.134.168.192";
};

# fim das minhas zonas ##

maykel-virtual-machine bind # cat named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

// named.conf
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
listen-on port 53 { 192.168.134.150; }; # DNS MASTER
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 { 192.168.134.150; }; # DNS SLAVE
recursion yes;
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";
forwarders {
8.8.8.8;
8.8.4.4;
};
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};


include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

######## zonas ############

zone "maykel.com.br" {
type master;
file "/var/named/db.maykel.com.br.hosts";
allow-update { none; };
allow-transfer { 192.168.134.150; };# DNS Slave
};

zone "134.168.192-addr.arpa" {
type master;
file "/var/named/db.134.168.192";
allow-update {
none;
};
allow-transfer {
192.168.134.150; };# DNS Slave
}

maykel-virtual-machine bind # cat named.conf.options
options {
directory "/var/cache/bind";

// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

// Security options
listen-on port 53 { 127.0.0.1; 192.168.134.152; };
allow-query { 127.0.0.1; 192.168.134.0/24; };
allow-recursion { 127.0.0.1; 192.168.134.0/24; };
allow-transfer { nome; };




//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};


maykel-virtual-machine bind # cat db.134.168.192
ND zone file for 192.168.1.xxx
;

$TTL 3D
134.168.192.in-addr.arpa. IN SOA ns.maykel.com.br root.maykel.com.br (
2010111101 ; serial
8H ; refresh
2H ; retry
4W ; expire
1D ) ; minimum
;
IN NS ns.maykel.com.br.
IN NS ns2.maykel.com.br.
IN NS correio.maykel.com.br.

150.134.168.192.in-addr.arpa IN PTR ns1.maykel.com.br.
150.134.168.192.in-addr.arpa IN PTR ns2.maykel.com.br.
152.134.168.192.in-addr.arpa IN PTR correio.maykel.com.br.



100 PTR server.maykel.com.br.
100 PTR ns.maykel.com.br.
100 PTR mail.maykel.com.br.
101 PTR virtual.maykel.com.br.
1 PTR router.maykel.com.br.


maykel-virtual-machine bind # cat db.maykel.com.br
;
; BIND zone file for home.lan
;

$TTL 3D
@ IN SOA ns.maykel.com.br. root.maykel.com.br. (
01 ; serial
8H ; refresh
2H ; retry
4W ; expire
1D ) ; minimum
;
NS ns ; Inet address of name server
MX 10 mail ; Primary mail exchanger

; Necessario para funfar
ns IN A 192.168.134.152
;

; Hosts Reais
www IN A 192.168.134.152
ftp IN A 192.168.134.152
smtp IN A 192.168.134.152
imap IN A 192.168.134.152
;

gateway CNAME router
gw CNAME router


maykel-virtual-machine bind # cat maykel.com.br.hosts
$ttl 38400
maykel.com.br. IN SOA ns1.maykel.com.br. root.maykel.com.br (
1375628367
10800
3600
604800
38400 )
IN NS ns1.maykel.com.br.
IN NS ns2.maykel.com.br.
IN MX 10 correio.dominio.com.br.

ns1.dominio.com.br. IN A 192.168.134.150
ns2.dominio.com.br. IN A 192.168.134.150
correio.dominio.com.br IN A 192.168.134.152

smtp IN CNAME correio
imap IN CNAME correio
pop IN CNAME correio
webmail IN CNAME correio

@ IN TXT "v=spf ip4:192.168.134.152 -all"



não sei mais o que fazer
fiz alguns testes:

maykel-virtual-machine bind # /etc/init.d/bind9 start
* Starting domain name service... bind9 [fail]

maykel-virtual-machine bind # nslookup ns1.maykel.com.br
Server: 208.67.220.220
Address: 208.67.220.220#53

Non-authoritative answer:
Name: ns1.maykel.com.br
Address: 98.158.184.186

maykel-virtual-machine bind # service named configtest
named: unrecognized service

maykel-virtual-machine bind # named-checkconf -z
/etc/bind/named.conf:19: 'options' redefined near 'options'

maykel-virtual-machine bind # /etc/init.d/bind9 restart
* Stopping domain name service... bind9 rndc: connect failed: 127.0.0.1#953: connection refused
[ OK ]
* Starting domain name service... bind9 [fail]

maykel-virtual-machine bind # named-checkconf
/etc/bind/named.conf:19: 'options' redefined near 'options'

maykel-virtual-machine bind # /etc/init.d/bind9 restart
* Stopping domain name service... bind9 rndc: connect failed: 127.0.0.1#953: connection refused
[ OK ]
* Starting domain name service... bind9 [fail]

maykel-virtual-machine bind # nslookup ns1.maykel.com.br
Server: 208.67.222.222
Address: 208.67.222.222#53

Non-authoritative answer:
Name: ns1.maykel.com.br
Address: 98.158.184.186

maykel-virtual-machine bind # nslookup 192.168.134.150
Server: 208.67.222.222
Address: 208.67.222.222#53

*** Can't find 150.134.168.192.in-addr.arpa.: No answer

maykel-virtual-machine bind # host ns1.maykel.com.br
ns1.maykel.com.br has address 98.158.184.186

maykel-virtual-machine bind # host 192.168.134.152
152.134.168.192.in-addr.arpa has no PTR record

maykel-virtual-machine bind # host 192.168.134.150
150.134.168.192.in-addr.arpa has no PTR record

maykel-virtual-machine bind # nslookup 192.168.134.152
Server: 208.67.222.222
Address: 208.67.222.222#53

*** Can't find 152.134.168.192.in-addr.arpa.: No answer

maykel-virtual-machine bind # host -t soa maykel.com.br
maykel.com.br has SOA record ns1.maykel.com.br. cpanel.saninternet.com. 2013081200 86400 7200 3600000 86400

maykel-virtual-machine bind # host -t ns maykel.com.br
maykel.com.br name server ns1.maykel.com.br.
maykel.com.br name server ns2.maykel.com.br.

maykel-virtual-machine bind # host -t mx maykel.com.br
maykel.com.br mail is handled by 0 maykel.com.br.


como não consegui configurar de maneira correta a vm1 ainda nao configurei a vm2 mas desde ja mto obrigado pela ajuda


  






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts