informatica:linux:bind
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:bind [2012/05/17 14:15] – javi | informatica:linux:bind [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
bind, dns, dig, lookup | bind, dns, dig, lookup | ||
+ | |||
===== Instalación ===== | ===== Instalación ===== | ||
- | sudo aptitude update | + | sudo aptitude update; sudo aptitude install bind9 |
+ | ===== Configuración ===== | ||
+ | **/ | ||
+ | < | ||
+ | sudo mv / | ||
+ | sudo vim / | ||
+ | </ | ||
+ | < | ||
+ | // | ||
+ | // Do any local configuration here | ||
+ | // | ||
+ | // Consider adding the 1918 zones here, if they are not used in your | ||
+ | // organization | ||
+ | //include "/ | ||
- | ===== Configuración ===== | ||
- | **/etc/bind/named.conf.options** | + | zone " |
+ | type master; | ||
+ | file "/etc/bind/db.example.com"; | ||
+ | }; | ||
- | < | + | zone "1.168.192.in-addr.arpa" { |
- | sudo mv / | + | type master; |
- | sudo vim /etc/bind/named.conf.options | + | notify no; |
- | </ | + | file "/etc/bind/db.192"; |
+ | }; | ||
- | < | ||
options { | options { | ||
directory "/ | directory "/ | ||
Line 40: | Line 56: | ||
forwarders { | forwarders { | ||
# Replace the address below with the address of your provider' | # Replace the address below with the address of your provider' | ||
- | | + | |
}; | }; | ||
Line 46: | Line 62: | ||
listen-on-v6 { any; }; | listen-on-v6 { any; }; | ||
}; | }; | ||
- | |||
</ | </ | ||
- | |||
- | **/ | ||
- | |||
- | < | ||
- | sudo mv / | ||
- | |||
- | sudo vim / | ||
- | |||
- | // | ||
- | // Do any local configuration here | ||
- | // | ||
- | |||
- | // Consider adding the 1918 zones here, if they are not used in your | ||
- | // organization | ||
- | //include "/ | ||
- | |||
- | |||
- | zone " | ||
- | type master; | ||
- | file "/ | ||
- | }; | ||
- | |||
- | zone " | ||
- | type master; | ||
- | notify no; | ||
- | file "/ | ||
- | }; | ||
- | </ | ||
- | |||
- | |||
**/ | **/ | ||
Line 83: | Line 68: | ||
< | < | ||
sudo vim / | sudo vim / | ||
+ | </ | ||
+ | < | ||
$TTL 604800 | $TTL 604800 | ||
- | @ | + | @ |
3 ; Serial | 3 ; Serial | ||
| | ||
Line 95: | Line 82: | ||
dns IN A | dns IN A | ||
www | www | ||
+ | alias | ||
</ | </ | ||
Line 102: | Line 89: | ||
< | < | ||
sudo vim / | sudo vim / | ||
+ | </ | ||
+ | < | ||
; | ; | ||
; BIND reverse data file for local loopback interface | ; BIND reverse data file for local loopback interface | ||
; | ; | ||
$TTL 604800 | $TTL 604800 | ||
- | @ | + | @ |
3 ; Serial | 3 ; Serial | ||
| | ||
Line 114: | Line 103: | ||
| | ||
; | ; | ||
- | @ | + | @ |
16 IN PTR | 16 IN PTR | ||
14 IN PTR | 14 IN PTR | ||
</ | </ | ||
- | |||
- | |||
===== Probarlo ===== | ===== Probarlo ===== | ||
Line 138: | Line 125: | ||
3. (Opcional) Instalar paquetes: | 3. (Opcional) Instalar paquetes: | ||
- | sudo aptitude update | + | sudo aptitude update; sudo aptitude |
4. Probar: | 4. Probar: | ||
Line 176: | Line 163: | ||
sudo rndc reload | sudo rndc reload | ||
+ | | ||
+ | ==== Errores ==== | ||
+ | |||
+ | === Errores === | ||
+ | |||
+ | |||
+ | nslookup jamgo.es | ||
+ | |||
+ | < | ||
+ | Server: | ||
+ | Address: | ||
+ | |||
+ | ** server can't find jamgo.es: REFUSED | ||
+ | </ | ||
+ | |||
+ | Logs: | ||
+ | |||
+ | / | ||
+ | |||
+ | Jan 22 14:28:55 dns-1 named[1082]: | ||
+ | |||
+ | **Solucion** | ||
+ | |||
+ | sudo vim / | ||
+ | | ||
+ | Anyadir el rango de IPs que toquen: | ||
+ | |||
+ | < | ||
+ | # ANYADIDO 22/012015 | ||
+ | acl " | ||
+ | 10.7.13.0/ | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | Y editar dentro de el bloque options esto: | ||
+ | |||
+ | < | ||
+ | options { | ||
+ | # ADD | ||
+ | allow-query { trusted; }; | ||
+ | allow-recursion { trusted; }; | ||
+ | allow-query-cache { trusted; }; | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | Recargar config: | ||
+ | sudo / | ||
+ | |
informatica/linux/bind.txt · Last modified: 2015/04/13 20:19 by 127.0.0.1