buenas, ante todo saludos a todos los hackers del foro, quisiera comentar un problema que me ocurre con las dns de bind9 y el programa ISPCONFIG, he seguido este tutorial y no encuentro porque no me resuelve las direcciones bind9, alguien que me pueda hechar un cable estoy desesperado. Gracias.
http://www.colibris.es/tutorial/como-configurar-ispconfig
este es el proceso que he seguido y no me ha dado ningun problema hasta que llegan las malditas dns, no se donde se crean los archivos de las dns ispconfig ni nada, estoy un poco pobre en esto de las dns.
por lo que he podido probar es que si en el cliente toco el /etc/hosts
y le agrego 192.168.1.200 tecasoft.local me redirige sin problema, pero asi no funciona realmente las dns, alguna pista
Los archivos de DNS se encuentran en /etc/bind. Tienes que configurar las zonas en el named.conf y en sus archivos respectivos.
he probado a hacer:
dig tecasoft.local
y nada de nada
con:
dig www.debian.org
funciona bien da respuesta tanto cliente como server 7 wheezy con ispconfig,
que esta sucediendo...
Si tienes tecasoft.local en tu archivo /etc/hosts entonces este no es un registro de DNS. Dig hace una query a un servidor DNS, en este caso es el que aparece en /etc/resolv.conf. En ningun momento haz puesto la entrada en ningun servidor DNS por lo que no esperes una respuesta de un programa que le pregunta a los servidores DNS.
Si haces un nslookup tecasoft.local desde tu maquina que tiene el /etc/hosts si debería resolverte a una ip.
desde el cliente:
tronic@debian-2:~$ nslookup tecasoft.local
Server: 87.216.1.65
Address: 87.216.1.65#53
** server can't find tecasoft.local: NXDOMAIN
me crea este archivo en el servidor:
root@tecasoft:/etc/bind# cat pri.tecasoft.local.err
$TTL 3600
@ IN SOA ns1.tecasoft.local. webmaster.tecasoft.local. (
2015060501 ; serial, todays date + todays serial #
7200 ; refresh, seconds
540 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
;
mail 3600 A 192.168.1.200
tecasoft.local. 3600 A 192.168.1.200
www 3600 A 192.168.1.200
tecasoft.local. 3600 MX 10 mail.tecasoft.local.
tecasoft.local. 3600 NS ns1.tecasoft.local.
tecasoft.local. 3600 NS ns2.tecasoft.local.
ispconfig me crea ese archivo dentro de /etc/bind cuando le agrego una zona dns desde su panel
Hazlo así:
dig @127.0.0.1 tecasoft.local
Porfavor no hagas doble post y sigue estos consejos (http://foro.elhacker.net/gnulinux/usando_etiquetas_apropiadas_para_los_mensajes_con_codigologserrores-t434928.0.html).
root@tecasoft:/etc/bind# dig @127.0.0.1 tecasoft.local
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @127.0.0.1 tecasoft.local
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 52182
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;tecasoft.local. IN A
;; AUTHORITY SECTION:
. 6235 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2015060501 1800 900 604800 86400
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Jun 5 22:55:07 2015
;; MSG SIZE rcvd: 107
Es algo medio raro, el query lo estas haciendo a tu server DNS pero contesta el SOA de a.root-servers.net?
Haz esto y pon el resultado:
dig @127.0.0.1 tecasoft.local +trace
root@tecasoft:/etc/bind# dig @127.0.0.1 tecasoft.local +trace
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @127.0.0.1 tecasoft.local +trace
; (1 server found)
;; global options: +cmd
. 511579 IN NS m.root-servers.net.
. 511579 IN NS f.root-servers.net.
. 511579 IN NS c.root-servers.net.
. 511579 IN NS i.root-servers.net.
. 511579 IN NS d.root-servers.net.
. 511579 IN NS l.root-servers.net.
. 511579 IN NS b.root-servers.net.
. 511579 IN NS h.root-servers.net.
. 511579 IN NS g.root-servers.net.
. 511579 IN NS a.root-servers.net.
. 511579 IN NS k.root-servers.net.
. 511579 IN NS j.root-servers.net.
. 511579 IN NS e.root-servers.net.
;; Received 228 bytes from 127.0.0.1#53(127.0.0.1) in 1595 ms
. 86400 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2015060501 1800 900 604800 86400
;; Received 107 bytes from 198.41.0.4#53(198.41.0.4) in 83 ms
El servidor creo que no encuentra la zona y la esta delegando a otro servidor DNS. Puedes poner el contenido de /etc/bind/named.conf?
root@tecasoft:/etc/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";
root@tecasoft:/etc/bind# cat named.conf.default-zones
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
root@tecasoft:/etc/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.
// forwarders {
// 0.0.0.0;
// };
//========================================================================
// 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; };
};
root@tecasoft:/etc/bind# cat zones.rfc1918
zone "10.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "16.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "17.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "18.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "19.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "20.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "21.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "22.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "23.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "24.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "25.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "26.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "27.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "28.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "29.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "30.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
root@tecasoft:/etc/bind# cat db.empty
; BIND reverse data file for empty rfc1918 zone
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
$TTL 86400
@ IN SOA localhost. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS localhost.
No esta la zona en cuestión dentro del named.conf. ¿Será algo del ispconfig? Creo que el script no tiene permisos para escribir sobre el archivo, por eso no pudo agregar la zona. Aunque... creo que la carpeta de /etc/bind es igual de restrictiva.
que me recomiendas que haga?
Cita de: tecasoft en 6 Junio 2015, 01:48 AM
que me recomiendas que haga?
Pues puedes intentar ponerle permisos de escrituras a others pero siento que no es una buena idea. Podrías también agregar la zona manualmente. La syntax es parecida a las demás. La zona se debe llamar tecasoft.local y reinicia el server.
resuelve tecasoft.local cambiando permisos a la carpeta /etc/bind pero no resuelve www.tecasoft.local
Cita de: tecasoft en 6 Junio 2015, 02:57 AM
resuelve tecasoft.local cambiando permisos a la carpeta /etc/bind pero no resuelve www.tecasoft.local
Es porque necesitas agregar un registro www.
me sigue dando problemas cuando le parece va y cuando no, no va, estoy hecho un lio