•
Zonas predefinidas en BIND
Mediante el dump de zonas en BIND, podemos ver todas las que están configuradas: Incluso las predefinidas, vamos a ver que podemos obtener y cómo deshabilitarlas:
En el cache dump podemos ver las siguientes:
# grep "^; Zone" cache_dump.db ; Zone dump of '0.in-addr.arpa/IN/localhost_resolver' ; Zone dump of '0.0.127.in-addr.arpa/IN/localhost_resolver' ; Zone dump of '255.in-addr.arpa/IN/localhost_resolver' ; Zone dump of '0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN/localhost_resolver' ; Zone dump of 'ejemplo.com/IN/localhost_resolver' ; Zone dump of 'ejemplo2.com/IN/localhost_resolver' (...) ; Zone dump of 'ejemplo.net/IN/localhost_resolver' ; Zone dump of 'ejemplo2.com/IN/externa' (...) ; Zone dump of 'authors.bind/CH' ; Zone dump of 'hostname.bind/CH' ; Zone dump of 'version.bind/CH' ; Zone dump of 'id.server/CH'
Únicamente obtenemos respuesta de estas zonas si no tenemos deshabilitada la identificación de versión en BIND con la opción version:
version none;
Actualización: Para esconder también el hostname debemos añadir también la opción hostname (o indicar el string que queramos mostrar en su lugar):
hostname none;
Si no podemos obtener el listado de autores de BIND:
# dig authors.bind @127.0.0.1 -c CH -t txt +short "Brian Wellington" "Mark Andrews" "James Brister" "Ben Cottrell" "Michael Graff" "Andreas Gustafsson" "Bob Halley" "David Lawrence" "Danny Mayer" "Damien Neil" "Matt Nelson" "Michael Sawyer"
La versión exacta de bind:
# dig version.bind @127.0.0.1 -c CH -t txt +short "9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.5"
O incluso el hostname del equipo dónde se ejecuta:
# dig hostname.bind @127.0.0.1 -c CH -t txt +short "ejemplo.systemadmin.es"
Añadiendo las opciones version none y hostname none no obtenemos respuesta para dichas queries:
# dig version.bind @localhost -c CH -t txt ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.5 <<>> version.bind @localhost -c CH -t txt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61966 ;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;version.bind. CH TXT ;; AUTHORITY SECTION: version.bind. 86400 CH SOA version.bind. hostmaster.version.bind. 0 28800 7200 604800 86400 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Dec 19 13:17:29 2012 ;; MSG SIZE rcvd: 77 # dig hostname.bind @localhost -c CH -t txt ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.5 <<>> hostname.bind @localhost -c CH -t txt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47904 ;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;hostname.bind. CH TXT ;; AUTHORITY SECTION: hostname.bind. 86400 CH SOA hostname.bind. hostmaster.hostname.bind. 0 28800 7200 604800 86400 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Dec 19 13:17:37 2012 ;; MSG SIZE rcvd: 78
•
3 comments to “Zonas predefinidas en BIND”
•
19. December 2012 at 9:59 am :
Si no estoy equivocado creo que el hostname.bind sigue mostrándose aun teniendo el version none. Supongo que no se puede evitar ocultarlo.
19. December 2012 at 1:09 pm :
Cierto!
No únicamente se deben especificar version none sinó también hostname none. Lo actualizo en el post, muchas gracias por el comentario!
8. January 2013 at 2:39 am :
Do these commands only work using a local running copy of bind?
I can’t seem to get them to work externally.