configurando o Bind9 [RESOLVIDO]

37. configurações

Marcus Vinicius Gonçalves
imvinfo

(usa Debian)

Enviado em 22/09/2009 - 11:50h

Ola Renato,

FIz as alterações que vc pediu. O /etc/bind/named.conf.default-zones, não existia no meu diretório, então copiei o named.conf para dentro dele. Fiz as alterações nos db.dnsdebian, db.dnsdebian.reverse.

Executei o /etc/init.d/bind9 restart, olha o resultado:

Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: connection refused
.
Starting domain name service...: bind9 failed!

Fui verificar o log:

dnsdebian:~# tail -f /var/log/syslog
Sep 22 08:50:01 dnsdebian named[2409]: /etc/bind/named.conf.options:1: 'options' redefined near 'options'
Sep 22 08:50:01 dnsdebian named[2409]: loading configuration: already exists
Sep 22 08:50:01 dnsdebian named[2409]: exiting (due to fatal error)
Sep 22 08:52:49 dnsdebian named[2448]: starting BIND 9.5.1-P3 -u bind
Sep 22 08:52:49 dnsdebian named[2448]: found 1 CPU, using 1 worker thread
Sep 22 08:52:49 dnsdebian named[2448]: using up to 4096 sockets
Sep 22 08:52:49 dnsdebian named[2448]: loading configuration from '/etc/bind/named.conf'
Sep 22 08:52:49 dnsdebian named[2448]: /etc/bind/named.conf.options:1: 'options' redefined near 'options'
Sep 22 08:52:49 dnsdebian named[2448]: loading configuration: already exists
Sep 22 08:52:49 dnsdebian named[2448]: exiting (due to fatal error)
^C
dnsdebian:~# tail -f /var/log/daemon.log
Sep 22 08:50:01 dnsdebian named[2409]: /etc/bind/named.conf.options:1: 'options' redefined near 'options'
Sep 22 08:50:01 dnsdebian named[2409]: loading configuration: already exists
Sep 22 08:50:01 dnsdebian named[2409]: exiting (due to fatal error)
Sep 22 08:52:49 dnsdebian named[2448]: starting BIND 9.5.1-P3 -u bind
Sep 22 08:52:49 dnsdebian named[2448]: found 1 CPU, using 1 worker thread
Sep 22 08:52:49 dnsdebian named[2448]: using up to 4096 sockets
Sep 22 08:52:49 dnsdebian named[2448]: loading configuration from '/etc/bind/named.conf'
Sep 22 08:52:49 dnsdebian named[2448]: /etc/bind/named.conf.options:1: 'options' redefined near 'options'
Sep 22 08:52:49 dnsdebian named[2448]: loading configuration: already exists
Sep 22 08:52:49 dnsdebian named[2448]: exiting (due to fatal error)

E agora ???!!!???!!!


  


38. Re: configurando o Bind9 [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 22/09/2009 - 12:43h

Ah, kra... esqueci d passar o named.conf.options. Como estou no meu trabalho, vc pode remover a linha q refere-se a ele dentro do named.conf.


39. configurações

Marcus Vinicius Gonçalves
imvinfo

(usa Debian)

Enviado em 22/09/2009 - 17:27h

Ola Renato,

A noite vou alterar e te mando os log´s e o restart.

[]´s




40. configurações

Marcus Vinicius Gonçalves
imvinfo

(usa Debian)

Enviado em 23/09/2009 - 00:12h

Ola Renato,

Neste ponto eu eliminei a linha que vc sugeriu e "restartei" o processo
dnsdebian:~# vi /etc/bind/named.conf
dnsdebian:~# /etc/init.d/bind9 restart
Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: connection refused
.
Starting domain name service...: bind9 failed!

dnsdebian:~# tail -f /var/log/syslog
Sep 22 21:01:26 dnsdebian named[2177]: loading configuration from '/etc/bind/named.conf'
Sep 22 21:01:26 dnsdebian named[2177]: /etc/bind/named.conf:14: zone '.': already exists previous definition: /etc/bind/named.conf.default-zones:10
Sep 22 21:01:26 dnsdebian named[2177]: /etc/bind/named.conf:22: zone 'localhost': already exists previous definition: /etc/bind/named.conf.default-zones:18
Sep 22 21:01:26 dnsdebian named[2177]: /etc/bind/named.conf:27: zone '127.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:23
Sep 22 21:01:26 dnsdebian named[2177]: /etc/bind/named.conf:32: zone '0.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:28
Sep 22 21:01:26 dnsdebian named[2177]: /etc/bind/named.conf:37: zone '255.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:33
Sep 22 21:01:26 dnsdebian named[2177]: /etc/bind/named.conf:42: zone 'dnsdebian': already exists previous definition: /etc/bind/named.conf.default-zones:38
Sep 22 21:01:26 dnsdebian named[2177]: /etc/bind/named.conf:47: zone '0.16.172.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:43
Sep 22 21:01:26 dnsdebian named[2177]: loading configuration: failure
Sep 22 21:01:26 dnsdebian named[2177]: exiting (due to fatal error)

Observei que ele estava com problemas também no named.conf.default-zones, então comentei a linha também.

dnsdebian:~# vi /etc/bind/named.conf
dnsdebian:~# /etc/init.d/bind9 restart
Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: connection refused
.
Starting domain name service...: bind9.
dnsdebian:~# tail -f /var/log/syslog
Sep 22 21:02:30 dnsdebian named[2218]: command channel listening on ::1#953
Sep 22 21:02:30 dnsdebian named[2218]: the working directory is not writable
Sep 22 21:02:30 dnsdebian named[2218]: zone 0.in-addr.arpa/IN: loaded serial 1
Sep 22 21:02:30 dnsdebian named[2218]: zone 127.in-addr.arpa/IN: loaded serial 1
Sep 22 21:02:30 dnsdebian named[2218]: zone 0.16.172.in-addr.arpa/IN: loaded serial 220920091
Sep 22 21:02:30 dnsdebian named[2218]: zone 255.in-addr.arpa/IN: loaded serial 1
Sep 22 21:02:30 dnsdebian named[2218]: dns_rdata_fromtext: /etc/bind/db.dnsdebian:17: near eol: unexpected end of input
Sep 22 21:02:30 dnsdebian named[2218]: zone dnsdebian/IN: loading from master file /etc/bind/db.dnsdebian failed: unexpected end of input
Sep 22 21:02:30 dnsdebian named[2218]: zone localhost/IN: loaded serial 2
Sep 22 21:02:30 dnsdebian named[2218]: running

Ele está mandando uma mensagem de erro na linha 17 do db.dnsdebian, tentei comentar, tirar algumas "coisas" como o 1 no final do arquivo, mas ai o erro vai "subindo" !!!!

É amigo viver é muito fácil, se comparado com a instalação do BIND9 !!!!!!!!!!

[]´s



41. Re: configurando o Bind9 [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 23/09/2009 - 09:38h

Kra, o q tá acontecendo é q vc não retirou aquele named.conf q a gente havia feito anteriormente. O esquema era vc t feito backup dele e substituído pelo q t passei. Ah! Vou colocar aki o named.conf.options q ficou faltando, dae vai dar tudo certo. Segue abaixo:

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.

// forwarders {
// 0.0.0.0;
// };

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



42. configuraçoes

Marcus Vinicius Gonçalves
imvinfo

(usa Debian)

Enviado em 23/09/2009 - 18:27h

Ola Renato,

Amigo, deu um monte de erros, só vou conseguir te passar os log´s mais a noite.

Vamos nos falando.

[]´s



43. configuraçoes

Marcus Vinicius Gonçalves
imvinfo

(usa Debian)

Enviado em 25/09/2009 - 10:20h

Segue abaixo o log:

/etc/init.d/bind9 restart
Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: connection refused
.
Starting domain name service...: bind9 failed!

tail -f /var/log/syslog
Sep 25 07:19:19 dnsdebian named[2130]: loading configuration from '/etc/bind/named.conf'
Sep 25 07:19:19 dnsdebian named[2130]: /etc/bind/named.conf:22: zone '.': already exists previous definition: /etc/bind/named.conf.default-zones:10
Sep 25 07:19:19 dnsdebian named[2130]: /etc/bind/named.conf:30: zone 'localhost': already exists previous definition: /etc/bind/named.conf.default-zones:18
Sep 25 07:19:19 dnsdebian named[2130]: /etc/bind/named.conf:35: zone '127.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:23
Sep 25 07:19:19 dnsdebian named[2130]: /etc/bind/named.conf:40: zone '0.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:28
Sep 25 07:19:19 dnsdebian named[2130]: /etc/bind/named.conf:45: zone '255.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:33
Sep 25 07:19:19 dnsdebian named[2130]: /etc/bind/named.conf:50: zone 'dnsdebian': already exists previous definition: /etc/bind/named.conf.default-zones:38
Sep 25 07:19:19 dnsdebian named[2130]: /etc/bind/named.conf:55: zone '0.16.172.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:43
Sep 25 07:19:19 dnsdebian named[2130]: loading configuration: failure
Sep 25 07:19:19 dnsdebian named[2130]: exiting (due to fatal error)

named-checkconf -z
/etc/bind/named.conf:22: zone '.': already exists previous definition: /etc/bind/named.conf.default-zones:10
/etc/bind/named.conf:30: zone 'localhost': already exists previous definition: /etc/bind/named.conf.default-zones:18
/etc/bind/named.conf:35: zone '127.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:23
/etc/bind/named.conf:40: zone '0.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:28
/etc/bind/named.conf:45: zone '255.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:33
/etc/bind/named.conf:50: zone 'dnsdebian': already exists previous definition: /etc/bind/named.conf.default-zones:38
/etc/bind/named.conf:55: zone '0.16.172.in-addr.arpa': already exists previous definition: /etc/bind/named.conf.default-zones:43

[]´s



44. Re: configurando o Bind9 [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 25/09/2009 - 10:30h

Kra, vc não apagou aquelas configs antigas q t falei! Vc tem q apagá-las, por isso q o log tá acusando q já tem registrado as zonas anteriores. Pq vc num apaga tudo e refaz d novo? Pegando os exemplos q t passei?


45. configuraçoes

Marcus Vinicius Gonçalves
imvinfo

(usa Debian)

Enviado em 25/09/2009 - 11:04h

Ola,

Fiz as alterações, renomiei os arquivos e gerei apartir dos arqivos que vc enviou no site, só fui copiando e colando, e tenho as seguintes mensagens do sistema:

tail -f /var/log/syslog
Sep 25 07:54:06 dnsdebian named[2328]: /etc/bind/named.conf:13: missing ';' before end of file
Sep 25 07:54:06 dnsdebian named[2328]: loading configuration: failure
Sep 25 07:54:06 dnsdebian named[2328]: exiting (due to fatal error)
Sep 25 07:59:12 dnsdebian named[2371]: starting BIND 9.5.1-P3 -u bind
Sep 25 07:59:12 dnsdebian named[2371]: found 1 CPU, using 1 worker thread
Sep 25 07:59:12 dnsdebian named[2371]: using up to 4096 sockets
Sep 25 07:59:12 dnsdebian named[2371]: loading configuration from '/etc/bind/named.conf'
Sep 25 07:59:12 dnsdebian named[2371]: /etc/bind/named.conf:13: missing ';' before end of file
Sep 25 07:59:12 dnsdebian named[2371]: loading configuration: failure
Sep 25 07:59:12 dnsdebian named[2371]: exiting (due to fatal error)

named-checkconf -z
/etc/bind/named.conf:13: missing ';' before end of file

Quando recebi essa mensagem fui dar uma olhada no named.conf:

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";

E agora ???


46. Re: configurando o Bind9 [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 25/09/2009 - 11:07h

Essa msg:

/etc/bind/named.conf:13: missing ';' before end of file

Na linha 13 do arquivo named.conf tá faltando um ponto-e-vírgula, só isso. Conserte e faça d novo.


47. configuraçoes

Marcus Vinicius Gonçalves
imvinfo

(usa Debian)

Enviado em 28/09/2009 - 11:45h

Ola Renato,

Fiz a alteração (não pensei que que era algo tão simples!!), olha a mensagem:

named-checkconf -z
zone localhost/IN: loaded serial 2
zone 127.in-addr.arpa/IN: loaded serial 1
zone 0.in-addr.arpa/IN: loaded serial 1
zone 255.in-addr.arpa/IN: loaded serial 1
zone dnsdebian/IN: dnsdebian/MX 'mail.dnsdebian' is a CNAME (illegal)
zone dnsdebian/IN: loaded serial 220920091
zone 0.16.172.in-addr.arpa/IN: loaded serial 220920091

tail -f /var/log/syslog
Sep 28 08:25:49 dnsdebian named[1730]: zone 0.16.172.in-addr.arpa/IN: loaded serial 220920091
Sep 28 08:25:49 dnsdebian named[1730]: zone 255.in-addr.arpa/IN: loaded serial 1
Sep 28 08:25:49 dnsdebian named[1730]: zone dnsdebian/IN: dnsdebian/MX 'mail.dnsdebian' is a CNAME (illegal)
Sep 28 08:25:49 dnsdebian named[1730]: zone dnsdebian/IN: loaded serial 220920091
Sep 28 08:25:49 dnsdebian named[1730]: zone localhost/IN: loaded serial 2
Sep 28 08:25:49 dnsdebian named[1730]: running
Sep 28 08:25:53 dnsdebian /usr/sbin/cron[2048]: (CRON) INFO (pidfile fd = 3)
Sep 28 08:25:53 dnsdebian /usr/sbin/cron[2049]: (CRON) STARTUP (fork ok)
Sep 28 08:25:53 dnsdebian /usr/sbin/cron[2049]: (CRON) INFO (Running @reboot jobs)
Sep 28 08:25:54 dnsdebian kernel: [ 36.073051] eth0: no IPv6 routers present

As mensagens de erro com o mail, pode ser porque não configurei esse serviço no Linux ?

Quando executo o nslookup no XPvirtual, ele mostra para mim "os servidores padrão não estão disponíveis. Servidor: unknowm. Address: 172.16.0.27, nome=dnsdebian."

Quando executo o dig no linux:
dig dnsdebian

; <<>> DiG 9.5.1-P3 <<>> dnsdebian
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 3634
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;dnsdebian. IN A

;; AUTHORITY SECTION:
. 9749 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2009092800 1800 900 604800 86400

;; Query time: 21 msec
;; SERVER: 172.16.0.25#53(172.16.0.25)
;; WHEN: Mon Sep 28 08:43:44 2009
;; MSG SIZE rcvd: 102

Ainda não consigo pingar pelo nome. Mas vc acha que isso pode ser um problema, numa rede pequena ? Não seria bom para a segurança, assim alguém mal intensionado não localizaria as estações tão fácil ?



48. Re: configurando o Bind9 [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 28/09/2009 - 16:33h

É ae q tá, pra pingar vc deve fazer assim:

# ping ns1.dnsdebian

Assim vc consegue pingar, ok? Se vc colocar só o nome não pinga msm.






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts