Como eu sei se o bind/dns esta funcionando?
Li todos os artigos que estava em: https://under-linux.org/modules.php?name=Sections&op=listarticles&secid=1&PHPSESSID=ed889ebbb34dc8479569d416036a3b6b
e achei mais fácil configurar o bind/dns pelo: https://under-linux.org/modules.php?name=Sections&op=viewarticle&artid=222.
Segui todos os passos mas não sei se o bind/dns esta funcionando. Quando digito "service named start" e depois "service named status" aparece uma mensagem de erro. Vejam abaixo:
"
[root@rh9-test root]# service named start
[root@rh9-test root]# service named status
rndc: connect failed: connection refused
[root@rh9-test root]#
"
Abaixo estão meus arquivos de configuração do bind/dns. Espero que possam me ajudar.
O que esta em "/var/named/primary" é o lasertest.conf
"
zone "lasertest.laser.br" {
type master;
file "zone/db.lasertest";
};
zone "130.172.168.192.in-addr.arpa" {
type master;
file "zone/rev.lasertest";
};
"
Os que estão em "/var/named/zone" são: db.lasertest e e rev.lasertest respectivamente
"
$TTL 86400
@ IN SOA lasertest.laser.br. postmaster.lasertest.laser.br. (
2003090200 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS lasertest.laser.br.
@ IN NS ns.lasertest.laser.br.
lasertest.laser.br. IN A 192.168.172.130
ns.lasertest.laser.br. IN A 192.168.172.130
ftp IN A 192.168.172.130
www IN CNAME lasertest.laser.br.
mail IN A 192.168.172.130
@ IN MX 5 mail.lasertest.laser.br.
pop IN CNAME mail.lasertest.laser.br.
smtp IN CNAME mail.lasertest.laser.br.
"
"
$TTL 86400
@ IN SOA lasertest.laser.br. postmaster.lasertest.laser.br. (
2003092002 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS lasertest.laser.br.
192.168.172.130.in-addr.arpa. IN PTR lasertest.laser.br.
"
Agora o named.conf
"
include "/var/named/primary/lasertest.conf"
"
Como eu sei se o bind/dns esta funcionando?
eu sempre faco assim:
named && tail -f /var/log/messages
ira mostrar os erros pertencentes ao servico named durante a tentativa de "startar" o mesmo.
com as mensagens de erro voce pode alterar os arquivos que correspondem aos erros acontecidos.
ou digite:
host home_de_um_host_cadastrado_no_arquivo_de_zona_direta
host ip_de_um_host_cadastrado_no_arquivo_de_zona_direta
Como eu sei se o bind/dns esta funcionando?
digite o seguinte comando :
dig seudominio.com.br
Este comando lhe mostrara se o seu dominio esta funcionando
corretamente ou nao .
Como eu sei se o bind/dns esta funcionando?
Consertei o named.conf pois faltava um ponto e vírgula no final do arquivo e aí fiz o seguinte: Digitei no terminal: " named && tail -f /var/log/messages" e me apareceu a seguinte mensagem:
"
Oct 9 09:17:36 rh9-test gconfd (root-1162): Resolved address "xml:readwrite:/root/.gconf" to a writable config source at position 1
Oct 9 09:17:36 rh9-test gconfd (root-1162): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2
Oct 9 09:17:44 rh9-test kernel: cdrom: This disc doesn´t have any tracks I recognize!
Oct 9 09:21:24 rh9-test ntpd[706]: kernel time discipline status change 41
Oct 9 09:22:09 rh9-test nmbd[975]: [2003/10/09 09:22:09, 0] nmbd/nmbd_namequery.c:query_name_response(101)
Oct 9 09:22:09 rh9-test nmbd[975]: query_name_response: Multiple (2) responses received for a query on subnet 192.168.172.130 for name LASERTOOLS<1d>.
Oct 9 09:22:09 rh9-test nmbd[975]: This response was from IP 192.168.172.161, reporting an IP address of 192.168.172.161.
Oct 9 09:22:27 rh9-test ntpd[706]: kernel time discipline status change 1
Oct 9 09:22:55 rh9-test named[1298]: starting BIND 9.2.1
Oct 9 09:22:55 rh9-test named[1298]: using 1 CPU
Oct 9 09:22:56 rh9-test named[1298]: loading configuration from ´/etc/named.conf´
Oct 9 09:22:56 rh9-test named[1298]: no IPv6 interfaces found
Oct 9 09:22:56 rh9-test named[1298]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 9 09:22:56 rh9-test named[1298]: binding TCP socket: address in use
Oct 9 09:22:56 rh9-test named[1298]: listening on IPv4 interface eth0, 192.168.172.130#53
Oct 9 09:22:56 rh9-test named[1298]: binding TCP socket: address in use
Oct 9 09:22:56 rh9-test named[1298]: couldn´t add command channel 127.0.0.1#953: address in use
Oct 9 09:22:56 rh9-test named[1298]: couldn´t open pid file ´/var/run/named/named.pid´: File exists
Oct 9 09:22:56 rh9-test named[1298]: exiting (due to early fatal error)
"
Depois fui ao terminal novamente e digitei: "dig lasertest.laser.br" e me apareceu a seguinte mensagem:
"
; <<>> DiG 9.2.1 <<>> lasertest.laser.br
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 57504
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;lasertest.laser.br. IN A
;; Query time: 48 msec
;; SERVER: 200.204.0.10#53(200.204.000.10)
;; WHEN: Thu Oct 9 09:23:10 2003
;; MSG SIZE rcvd: 36
"
Como sou novato em linux eu ainda não sei se o bind/dns está funcionando e se está funcionando, como eu acesso as páginas html. php.. pelo ie nas outras estações sem precisar digitar o ip e sim o domínio?.
Como eu sei se o bind/dns esta funcionando?
Oct 9 09:22:56 rh9-test named[1298]: couldn´t add command channel 127.0.0.1#953: address in use
Oct 9 09:22:56 rh9-test named[1298]: couldn´t open pid file ´/var/run/named/named.pid´: File exists
Oct 9 09:22:56 rh9-test named[1298]: exiting (due to early fatal error)
o rndc provavelmente já estará a correr por isso nao deixa criar de novo ...
presta bem em atenção ás configurações no /etc/named.conf
para o serviço e faz um ps ax e cola aqui ... depois inicia o serviço e pasta outro ps ax ..
depois volta a pastar os logs