removido
(usa Nenhuma)
Enviado em 11/06/2012 - 19:10h
Estou utilizando o Debian 6 com kernel 2.6.32-5-686
bind9 9.7.3.dfsg-1~squeez Internet Domain Name Server
Tomei uma surra para configurar o key, mas deu certo. Fiz toda a configuração dos arquivos
named.conf -> nao alterado, porque ele faz chamada aos outros arquivos atraves do include
named.conf.local
named.conf.options
named.conf.default-zones
ficando assim:
# nano named.conf.local
include "/etc/bind/rndc.key";
zone "ipnet.net" {
type master;
file "/etc/bind/db.fwtel";
allow-update { key rndc-key;};
};
zone "1.1.10.in-addr.arp" {
type master;
file "/etc/bind/db.10";
allow-update { key rndc-key;};
};
Obs: como esse arquivo estava limpo, publiquei nele apenas o meu
# nano named.conf.options
options {
// directory "/var/cache/bind";
directory "/etc/bind";
version "N/A"; //Oculta versao
// empty-zones-enable no;
allow-query { 127.0.0.1;10.1.1.0/24;}; //Permite consulta para essas redes
allow-transfer { any;}; // indicar qdo tiver slave
forwarders { 8.8.8.8; 8.8.4.4;}; // O que nao resolve, repassa para este
forward first;
auth-nxdomain yes; // Dominio existe, autoritario nessa rede
listen-on port 53 {127.0.0.1;10.1.1.1;};
};
# nano resolv.conf -> tanto faz comentando as linhas ou nao, deixando apenas o localhost
#domain cba.virtua.com.br
#search cba.virtua.com.br
#nameserver 187.123.31.56
#nameserver 187.123.31.52
nameserver 10.1.1.1
# nano host.conf
multi on
# nano hosts
127.0.0.1 localhost
10.1.1.1 fwtel.home.lan fwtel
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# nano db.fwtel -> arquivo de configuração direto
$TTL 86400 ; 24 horas
@ IN SOA ns1.ipnet.lan. root.ipnet.lan. (
2 ; serial
8H ; refresh
4H ; retry
2D ; expire
1D ; minimum
)
@ IN NS ns1.ipnet.lan.
ns1 IN A 10.1.1.1
www IN A 10.1.1.1
@ nano db.10 -> arquivo de configuração reverso
$TTL 86400 ; 24 horas
@ IN SOA ns1.ipnet.lan. root.ipnet.lan. (
2 ; serial
8H ; refresh
4H ; retry
2D ; expire
1D ; minimum
)
@ IN NS ns1.ipnet.lan.
1 IN PTR ns1.ipnet.lan.
10 IN PTR mail.ipnet.lan.
# named-checkconf - nao apresenta nenhum erro
# named-checkzone db.fwtel db.fwtel
zone db.fwtel/IN: loaded serial 2
OK
LOG do restart do BIN9 - nao vejo nenhum erro
Jun 11 14:02:13 fwtel named[8137]: received control channel command 'stop -p'
Jun 11 14:02:13 fwtel named[8137]: shutting down: flushing changes
Jun 11 14:02:13 fwtel named[8137]: stopping command channel on 127.0.0.1#953
Jun 11 14:02:13 fwtel named[8137]: no longer listening on 127.0.0.1#53
Jun 11 14:02:13 fwtel named[8137]: no longer listening on 10.1.1.1#53
Jun 11 14:02:13 fwtel named[8137]: exiting
Jun 11 14:02:14 fwtel named[8170]: starting BIND 9.7.3 -u bind
Jun 11 14:02:14 fwtel named[8170]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=' 'CPPFLAGS='
Jun 11 14:02:14 fwtel named[8170]: adjusted limit on open files from 1024 to 1048576
Jun 11 14:02:14 fwtel named[8170]: found 1 CPU, using 1 worker thread
Jun 11 14:02:14 fwtel named[8170]: using up to 4096 sockets
Jun 11 14:02:14 fwtel named[8170]: loading configuration from '/etc/bind/named.conf'
Jun 11 14:02:14 fwtel named[8170]: using default UDP/IPv4 port range: [1024, 65535]
Jun 11 14:02:14 fwtel named[8170]: using default UDP/IPv6 port range: [1024, 65535]
Jun 11 14:02:15 fwtel named[8170]: listening on IPv4 interface lo, 127.0.0.1#53
Jun 11 14:02:15 fwtel named[8170]: listening on IPv4 interface eth1, 10.1.1.1#53
Jun 11 14:02:15 fwtel named[8170]: generating session key for dynamic DNS
Jun 11 14:02:15 fwtel named[8170]: set up managed keys zone for view _default, file 'managed-keys.bind'
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 0.IN-ADDR.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 254.169.IN-ADDR.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 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.0.IP6.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 1.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
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: D.F.IP6.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 8.E.F.IP6.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 9.E.F.IP6.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: A.E.F.IP6.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: B.E.F.IP6.ARPA
Jun 11 14:02:15 fwtel named[8170]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Jun 11 14:02:15 fwtel named[8170]: command channel listening on 127.0.0.1#953
Jun 11 14:02:15 fwtel named[8170]: couldn't add command channel ::1#953: address not available
Jun 11 14:02:15 fwtel named[8170]: zone 1.1.10.in-addr.arp/IN: loaded serial 2
Jun 11 14:02:15 fwtel named[8170]: zone 127.in-addr.arpa/IN: loaded serial 1
Jun 11 14:02:15 fwtel named[8170]: zone localhost/IN: loaded serial 2
Jun 11 14:02:15 fwtel named[8170]: zone ipnet.net/IN: loaded serial 2
Jun 11 14:02:15 fwtel named[8170]: managed-keys-zone ./IN: loading from master file managed-keys.bind failed: file not found
Jun 11 14:02:15 fwtel named[8170]: managed-keys-zone ./IN: loaded serial 0
Jun 11 14:02:15 fwtel named[8170]: running
# netstat -putan | grep named
tcp 0 0 10.1.1.1:53 0.0.0.0:* OUÃA 8170/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* OUÃA 8170/named
tcp 0 0 127.0.0.1:953 0.0.0.0:* OUÃA 8170/named
udp 0 0 10.1.1.1:53 0.0.0.0:* 8170/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 8170/named
# dig @10.1.1.1 google.com.br -> Verificando a consulta externa pelo DIG para outros dominios, funciona perfeitamente, mas veja abaixo quando tento consultar o meu dominio interno.
; <<>> DiG 9.7.3 <<>> @10.1.1.1 google.com.br
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19294
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 13, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com.br. IN A
;; ANSWER SECTION:
google.com.br. 300 IN A 74.125.137.94
;; AUTHORITY SECTION:
. 86287 IN NS f.root-servers.net.
. 86287 IN NS h.root-servers.net.
. 86287 IN NS d.root-servers.net.
. 86287 IN NS k.root-servers.net.
. 86287 IN NS j.root-servers.net.
. 86287 IN NS e.root-servers.net.
. 86287 IN NS a.root-servers.net.
. 86287 IN NS i.root-servers.net.
. 86287 IN NS m.root-servers.net.
. 86287 IN NS c.root-servers.net.
. 86287 IN NS g.root-servers.net.
. 86287 IN NS l.root-servers.net.
. 86287 IN NS b.root-servers.net.
;; Query time: 227 msec
;; SERVER: 10.1.1.1#53(10.1.1.1)
;; WHEN: Mon Jun 11 14:04:54 2012
;; MSG SIZE rcvd: 258
# dig @10.1.1.1 ipnet.lan -> Consultando na propria maquina apresenta esse erro, e também nao consegue pingar nesse nome, o que já devera funcionar também.
; <<>> DiG 9.7.3 <<>> @10.1.1.1 ipnet.lan
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 16207
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;ipnet.lan. IN A
;; AUTHORITY SECTION:
. 1800 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2012061101 1800 900 604800 86400
;; Query time: 199 msec
;; SERVER: 10.1.1.1#53(10.1.1.1)
;; WHEN: Mon Jun 11 14:06:28 2012
;; MSG SIZE rcvd: 102
# nslookup google.com.br -> Rodando NSLookup para o google.com.br, tem resposta correta
Server: 10.1.1.1
Address: 10.1.1.1#53
Non-authoritative answer:
Name: google.com.br
Address: 74.125.137.94
# nslookup ipnet.lan -> Rodando NSLookup para meu dominio, da erro
Server: 10.1.1.1
Address: 10.1.1.1#53
** server can't find ipnet.lan: NXDOMAIN
Peço gentileza de quem puder me ajduar, estou começando com o debian agora, mas estou levando a maior surra. Quero montar nele DNS, Firewall, Squid, Apache2, DHCPD, Asterisk,PostFix. Rsrsrs
Aguardo ajuda.