hackingsnake
(usa Slackware)
Enviado em 25/10/2008 - 10:35h
- Aqui estou eu outra vez, pedindo a colaboração de vocês´. Dessa vez é o seguinte:
- Instalei o BIND na jaula "chroot" como já fizera em outra oportunidade, e desejo utilizar algumas zonas, por hora quero subir apenas uma a qual é "smsynergy.com.br", o problema é que tudo parece ok, inclusive as zonas são testadas com o "named-checkzone" e tudo retorna ok, porém quando vou checar no registro.br ele dá esgotado tempo limite: Vamos às configurações:
/chroot/named/etc/named.conf
options {
directory "/conf";
pid-file "/var/run/named.pid";
statistics-file "/var/run/named.stats";
dump-file "/var/run/named.db";
transfer-format many-answers;
# hide our "real" version number
version "[secured]";
};
# Use with the following in named.conf, adjusting the allow list as needed:
key "rndc-key" {
algorithm hmac-md5;
secret "MZ1p4awjspPPZBO9KwNG6w==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf
# The root nameservers
zone "." {
type hint;
file "db.rootcache";
};
# localhost - forward zone
zone "localhost" {
type master;
file "db.localhost";
notify no;
};
# localhost - inverse zone
zone "0.0.127.in-addr.arpa" {
type master;
file "db.127.0.0";
notify no;
};
zone "smsynergy.com.br" in {
type master;
file "smsynergy.com.br.domain";
};
---------------------------------------------------------
Checagem de zonas:
root@synergy:/chroot/named/conf# named-checkzone localhost db.localhost
zone localhost/IN: loaded serial 42
OK
root@synergy:/chroot/named/conf# named-checkzone smsynergy.com.br smsynergy.com.br.domain
zone smsynergy.com.br/IN: loaded serial 2005011297
OK
root@synergy:/chroot/named/conf# named-checkzone 127.0.0.0 db.127.0.0
zone 127.0.0.0/IN: loaded serial 1
OK
--------------------------------------------------------------------------------
/chroot/named/conf/smsynergy.com.br.domain
$TTL 86400
; Authoritative data for smsynergy.com.br
;
@ IN SOA synergy. root.smsynergy.com.br. (
2005011297 ; Serial (yymmddxx)
10800 ; Refresh 3 hours
3600 ; Retry 1 hour
36000 ; Expire 10 hours
86400 ) ; Minimum 24 hours
IN NS ns1.smsynergy.com.br.
IN NS ns2.smsynergy.com.br.
;
;Recebimento de mensagens de mail
;
smsynergy.com.br. IN MX 0 mx
smsynergy.com.br. IN MX 10 mx
localhost IN A 127.0.0.1
IN HINFO INTEL/110 LINUX
smsynergy.com.br. IN A 201.83.0.55
ns1 IN A 192.168.0.200
ns2 IN A 192.168.0.200
mx IN A 192.168.0.200
smtp IN A 192.168.0.200
pop IN A 192.168.0.200
www IN A 192.168.0.200
ftp IN A 192.168.0.200
-----------------------------------------
Saída do iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
REDIRECT tcp -- localnet/24 anywhere tcp dpt:http redir ports 3128
DNAT tcp -- anywhere anywhere tcp dpt:5555 to:192.168.0.200:80
DNAT tcp -- anywhere anywhere tcp dpt:domain to:192.168.0.200:53
DNAT udp -- anywhere anywhere udp dpt:domain to:192.168.0.200:53
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- localnet/24 anywhere
MASQUERADE all -- anywhere localnet/24
MASQUERADE all -- anywhere localnet/24
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
--------------------------------------------
Considerações:
O nome da minha máquina é "synergy" quando eu pingo a zona [www.smsynergy.com.br]: ele responde, no /etc/resolve.conf está tudo ok adicionado o dominio, e o nameserver do server ^^.).
Sim, eu uso o Squid sem autenticação para a rede interna, esse server é POLIVALENTE (XEON QUAD - 8 GB RAM 8TB em discos, só nele), e ainda estou usando um DDNS na porta 5555 ==> 80, até resolver o problema do bind.
http://registro.br/cgi-bin/nicbr/dnscheck (É aqui que estou fazendo a checagem do DNS)
- Fico na maior parte do dia on-line Outlook, MSN, SKYPE, caso alguém possa me ajudar, ou precise da minha ajuda, estarei sempre disponível para os 2.!
Teste de ping:
root@synergy:/chroot/named/conf# ping
http://www.smsynergy.com.br
PING
http://www.smsynergy.com.br (192.168.0.200) 56(84) bytes of data.
64 bytes from synergy.smgroup (192.168.0.200): icmp_seq=1 ttl=64 time=0.021 ms
64 bytes from synergy.smgroup (192.168.0.200): icmp_seq=2 ttl=64 time=0.018 ms
64 bytes from synergy.smgroup (192.168.0.200): icmp_seq=3 ttl=64 time=0.015 ms
64 bytes from synergy.smgroup (192.168.0.200): icmp_seq=4 ttl=64 time=0.016 ms
---------------------------------------------------------------------
Saída do Messanges (LOG)
Oct 22 17:25:43 synergy named[6820]: starting BIND 9.4.2-P2 -t /chroot/named -u named -c /etc/named.conf
Oct 22 17:25:43 synergy named[6820]: found 1 CPU, using 1 worker thread
Oct 22 17:25:43 synergy named[6820]: loading configuration from '/etc/named.conf'
Oct 22 17:25:43 synergy named[6820]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 22 17:25:43 synergy named[6820]: listening on IPv4 interface eth1, 192.168.0.250#53
Oct 22 17:25:43 synergy named[6820]: listening on IPv4 interface eth0, 192.168.0.200#53
Oct 22 17:25:43 synergy named[6820]: listening on IPv4 interface eth4, 201.83.0.55#53
Oct 22 17:25:43 synergy named[6820]: automatic empty zone: 127.IN-ADDR.ARPA
Oct 22 17:25:43 synergy named[6820]: automatic empty zone: 254.169.IN-ADDR.ARPA
Oct 22 17:25:43 synergy named[6820]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Oct 22 17:25:43 synergy named[6820]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Oct 22 17:25:43 synergy named[6820]: 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
Oct 22 17:25:43 synergy named[6820]: 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
Oct 22 17:25:43 synergy named[6820]: automatic empty zone: D.F.IP6.ARPA
Oct 22 17:25:43 synergy named[6820]: automatic empty zone: 8.E.F.IP6.ARPA
Oct 22 17:25:43 synergy named[6820]: automatic empty zone: 9.E.F.IP6.ARPA
Oct 22 17:25:43 synergy named[6820]: automatic empty zone: A.E.F.IP6.ARPA
Oct 22 17:25:43 synergy named[6820]: automatic empty zone: B.E.F.IP6.ARPA
Oct 22 17:25:43 synergy named[6820]: command channel listening on 127.0.0.1#953
Oct 22 17:25:43 synergy named[6820]: zone smsynergy.com.br/IN: loaded serial 2005011297
Oct 22 17:25:43 synergy named[6820]: zone localhost/IN: loaded serial 42
Oct 22 17:25:43 synergy named[6820]: running
Oct 22 17:25:43 synergy named[6820]: zone smsynergy.com.br/IN: sending notifies (serial 2005011297)
-------------------------------------------------------------------------------------------------
Saída do NMAP:
Starting Nmap 4.20 (
http://insecure.org ) at 2008-10-23 08:23 BRT
Initiating Parallel DNS resolution of 1 host. at 08:23
Completed Parallel DNS resolution of 1 host. at 08:23, 0.01s elapsed
Initiating SYN Stealth Scan at 08:23
Scanning c9530037.virtua.com.br (201.83.0.55) [1697 ports]
Discovered open port 113/tcp on 201.83.0.55
Discovered open port 80/tcp on 201.83.0.55
Discovered open port 53/tcp on 201.83.0.55
Discovered open port 10000/tcp on 201.83.0.55
Discovered open port 139/tcp on 201.83.0.55
Discovered open port 37/tcp on 201.83.0.55
Discovered open port 3128/tcp on 201.83.0.55
Discovered open port 445/tcp on 201.83.0.55
Completed SYN Stealth Scan at 08:23, 0.06s elapsed (1697 total ports)
Host c9530037.virtua.com.br (201.83.0.55) appears to be up ... good.
Interesting ports on c9530037.virtua.com.br (201.83.0.55):
Not shown: 1689 closed ports
PORT STATE SERVICE
37/tcp open time
53/tcp open domain Aqui o Bind deveria atender
80/tcp open http Apache rodando ^^.)
113/tcp open auth
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3128/tcp open squid-http Squid pra rede interna.
10000/tcp open snet-sensor-mgmt To usando o Webadmin aqui..
Nmap finished: 1 IP address (1 host up) scanned in 0.093 seconds
Raw packets sent: 1697 (74.668KB) | Rcvd: 3402 (142.900KB)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Monitorando o /var/log/messages, com o named rodando, quando tento inserir qualquer tralha pra checagem de DNS junto ao registro.br ele dá ocorrencia conforme abaixo:
Oct 23 11:20:29 synergy named[11427]: client 200.160.2.3#59046: query (cache) 'joaozinho.com.br/SOA/IN' denied
Oct 23 11:20:29 synergy named[11427]: client 200.160.2.3#63978: query (cache) 'joaozinho.com.br/SOA/IN' denied
Oct 23 11:20:29 synergy named[11427]: client 200.160.2.3#62207: query (cache) 'joaozinho.com.br/SOA/IN' denied
Oct 23 11:20:29 synergy named[11427]: client 200.160.2.3#49397: query (cache) 'joaozinho.com.br/SOA/IN' denied
Oct 23 11:20:29 synergy named[11427]: client 200.160.2.3#57160: query (cache) 'joaozinho.com.br/SOA/IN' denied
Oct 23 11:20:29 synergy named[11427]: client 200.160.2.3#61278: query (cache) 'joaozinho.com.br/SOA/IN' denied
Oct 23 11:20:29 synergy named[11427]: client 200.160.2.3#60048: query (cache) 'joaozinho.com.br/SOA/IN' denied
----------------------------------------------------------------------------------------------------------------------------------------------------------
24/10/2008 - 08:45
Aumentei o nível de Verbose do LOG para (5)
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: UDP request
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: using view '_default'
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: request is not signed
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: recursion not available
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: query
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: query 'smsynergy.com.br/SOA/IN' approved
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: send
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: sendto
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: senddone
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: next
24-Oct-2008 08:45:14.104 client 200.160.2.3#63723: endrequest
24-Oct-2008 08:45:14.104 client @0xb5215008: udprecv
- A Recursão está habilitada agora para o dominio local (INTERNO) o header do meu named.conf, encontra-se da seguinte forma:
options {
directory "/conf";
pid-file "/var/run/named.pid";
statistics-file "/var/run/named.stats";
dump-file "/var/run/named.db";
allow-transfer { localhost;};
listen-on {127.0.0.1; localhost; 192.168.0.250;};
allow-recursion {127.0.0.1; localhost; 192.168.0.0/24;};
transfer-format many-answers;
# hide our "real" version number
version "[secured]";
};
-------------------------------------------------------------------------------------------------------------------------------------------------------
24/10/2008 09:50
Após exaustivas pesquisar no google, e nos Log´s, resolvi que isso era um BUG da versão 9.4.2 (Inclusive achei essa explicação por ai, mais não achei solução, nem embasamento técnico para tal afirmação), fiz um Downgrade pra avesão 9.3.1 e continua a mesma M3#D@.!
====> Aguardando more help ^^.)
Obrigado,
One. ! Só ajudando para ser ajudado... Só contribuindo para ter de volta.!
Nothing good comes easy, and all good things take sometime.!
**http://counter.li.org/ as user #365910.
***Conte comigo. (The One).