Autor Tópico: [Resolvido] Problemas configuração Bind e Apache  (Lida 34866 vezes)

Offline Master_

  • Usuário Ubuntu
  • *
  • Mensagens: 221
  • Liberdade, ainda que tardia...
    • Ver perfil
[Resolvido] Problemas configuração Bind e Apache
« Online: 15 de Fevereiro de 2011, 15:49 »
Olá pessoal.

Estou configurando o Apache e o Bind no meu servidor dedicado para colocar um site no servidor.

Segui este tutorial: http://www.hardware.com.br/tutoriais/instalando-servidor-dns/ e alguns outros que encontrei semelhantes na internet.

Aparentemente ta tudo ok, no dns e no apache. Mas quando tento alterar as configurações do registro.br, para setar para este dedicado, recebo esta mensagem:

Código: [Selecionar]
Servidor DNS Master: Conexão recusada
Servidor DNS Slave 1: Conexão recusada

O que pode ser ???

« Última modificação: 22 de Fevereiro de 2011, 15:42 por Master_ »

Offline renato-barbosa

  • Usuário Ubuntu
  • *
  • Mensagens: 48
    • Ver perfil
    • Suporte Linux
Re: Problemas configuração Bind e Apache
« Resposta #1 Online: 15 de Fevereiro de 2011, 17:00 »
No instante que voce edita os Servidores NS no registro.br os servidores do registro.br efetuam uma conexão em seu servidor DNS para checar se o dominio efetivamente esta hospedado neste endereço.
Existem 2 hipoteses, ou o seu servidor DNS não recebe conexões externas ou está configurado errado o seu named.conf
Se possivel post o named.conf para que poassamos dar uma olhada.
Renato Barbosa
Porque "Suporte Linux"? Porque é Livre!

Offline Master_

  • Usuário Ubuntu
  • *
  • Mensagens: 221
  • Liberdade, ainda que tardia...
    • Ver perfil
Re: Problemas configuração Bind e Apache
« Resposta #2 Online: 15 de Fevereiro de 2011, 17:06 »
Fiz conforme o link informado anteriormente:

Código: [Selecionar]
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "luisr.com.br" IN {
type master;
file "/etc/bind/db.luisr";
allow-transfer { 66.7.220.132; };
};

Offline renato-barbosa

  • Usuário Ubuntu
  • *
  • Mensagens: 48
    • Ver perfil
    • Suporte Linux
Re: Problemas configuração Bind e Apache
« Resposta #3 Online: 15 de Fevereiro de 2011, 17:25 »
Voce está utilizando o Bind 8?
Melhor atualizar para o 9.
Se estiver usando o 9 me mande a configuração completa de tua view.
Renato Barbosa
Porque "Suporte Linux"? Porque é Livre!

Offline Master_

  • Usuário Ubuntu
  • *
  • Mensagens: 221
  • Liberdade, ainda que tardia...
    • Ver perfil
Re: Problemas configuração Bind e Apache
« Resposta #4 Online: 15 de Fevereiro de 2011, 17:36 »
Arquivo named.conf:
Código: [Selecionar]
// 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";


Arquivo named.conf.local:
Código: [Selecionar]
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "luisr.com.br" IN {
type master;
file "/etc/bind/db.luisr";
allow-transfer { 66.7.220.132; };
};

É isso?

Offline Master_

  • Usuário Ubuntu
  • *
  • Mensagens: 221
  • Liberdade, ainda que tardia...
    • Ver perfil
Re: Problemas configuração Bind e Apache
« Resposta #5 Online: 15 de Fevereiro de 2011, 17:43 »
Tem esse ainda:

Arquivo db.luisr
Código: [Selecionar]
@       IN SOA  servidor.luisr.com.br. hostmaster.luisr.com.br. (
        2011021545 3H 15M 1W 1D )
        NS servidor.luisr.com.br.
        IN MX 10 luisr.com.br.
Localhost               IN A    127.0.0.1
luisr.com.br.           IN A    66.7.220.131
ns2                     IN A    66.7.220.132
www                     IN A    66.7.220.131
ftp                     IN A    66.7.220.131

E está rodando bind9

Offline renato-barbosa

  • Usuário Ubuntu
  • *
  • Mensagens: 48
    • Ver perfil
    • Suporte Linux
Re: Problemas configuração Bind e Apache
« Resposta #6 Online: 16 de Fevereiro de 2011, 09:30 »
No seu servidor digite o comando:

host www.luisr.com.br 127.0.0.1

e post o retorno.
Renato Barbosa
Porque "Suporte Linux"? Porque é Livre!

Offline Master_

  • Usuário Ubuntu
  • *
  • Mensagens: 221
  • Liberdade, ainda que tardia...
    • Ver perfil
Re: Problemas configuração Bind e Apache
« Resposta #7 Online: 16 de Fevereiro de 2011, 09:34 »
Código: [Selecionar]
root@servidor:~# host www.luisr.com.br 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:

Host www.luisr.com.br not found: 2(SERVFAIL)

???

Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.735
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re: Problemas configuração Bind e Apache
« Resposta #8 Online: 16 de Fevereiro de 2011, 11:45 »
Opa, confirme que o teu BIND esteja em execução:

ps -ef | grep named

Confirme que ele esteja escutando a porta 53/udp:

netstat -atun | grep 53

Confirme que seu firewall esteja permitindo a entrada de requisições para a porta 53/udp:

sudo iptables -L -v -n INPUT

No arquivo de Zona, certifique-se de que há pelo menos um registro NS, que todos os registros NS tenham um nome (e não um IP), e que esses nomes estejam definidos por um registro A (ou AAAA, se estiver criando uma zona IPv6):

Citar
Código: [Selecionar]
@       IN SOA  servidor.luisr.com.br. hostmaster.luisr.com.br. (
        2011021545 3H 15M 1W 1D )
        NS ns1.luisr.com.br. # <-------------
        NS ns2.luisr.com.br. # <-------------
        IN MX 10 luisr.com.br.
Localhost               IN A    127.0.0.1
luisr.com.br.           IN A    66.7.220.131

ns1                     IN A    66.7.220.131 # <--------------------
ns2                     IN A    66.7.220.132 # <--------------------

www                     IN A    66.7.220.131
ftp                     IN A    66.7.220.131
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Offline rvgugisch

  • Usuário Ubuntu
  • *
  • Mensagens: 30
    • Ver perfil
Re: Problemas configuração Bind e Apache
« Resposta #9 Online: 16 de Fevereiro de 2011, 15:09 »
zekkerj, pelo jeito você sabe bem de DNS. E vou me meter na conversa aqui!

Estou com um problema, como copiei o exemplo da mesma página do Master que postou originalmente e vi seus comandos acima, gostaria que me ajudasse.

Eu tenho que colocar o DNS num server Ubuntu 10.10 aqui. Estou com o Bind9 instalado e já testei várias configurações e nada de fazer funcionar.

O bind9 está rodando normalmente.

Os arquivos estão como no site indicado acima (tutorial do Morimoto).

Só que os micros não resolvem nada nele. E se tento o comando DIG ele não me retorna nada plausível.

Vou postar o syslog e o resultado do DIG para você dar uma olhada!  Uma pergunta. O dominio que coloquei no DNS não existe no registro.br, eu necessito somente que ele use o DNS para minha rede, esse dominio ficticio que coloquei nos arquivos de configuração precisam ser regsitrados no registro.br?

SYSLOG quando eu starto o bind9:

Código: [Selecionar]
Feb 16 14:31:52 serverlinux named[7787]: starting BIND 9.7.1-P2 -u bind
Feb 16 14:31:52 serverlinux named[7787]: 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=-Wl,-Bsymbolic-functions' 'CPPFLAGS='
Feb 16 14:31:52 serverlinux named[7787]: adjusted limit on open files from 1024 to 1048576
Feb 16 14:31:52 serverlinux named[7787]: found 2 CPUs, using 2 worker threads
Feb 16 14:31:52 serverlinux named[7787]: using up to 4096 sockets
Feb 16 14:31:52 serverlinux named[7787]: loading configuration from '/etc/bind/named.conf'
Feb 16 14:31:52 serverlinux named[7787]: reading built-in trusted keys from file '/etc/bind/bind.keys'
Feb 16 14:31:52 serverlinux named[7787]: using default UDP/IPv4 port range: [1024, 65535]
Feb 16 14:31:52 serverlinux named[7787]: using default UDP/IPv6 port range: [1024, 65535]
Feb 16 14:31:52 serverlinux named[7787]: listening on IPv4 interface lo, 127.0.0.1#53
Feb 16 14:31:52 serverlinux named[7787]: listening on IPv4 interface eth1, 10.1.1.1#53
Feb 16 14:31:52 serverlinux named[7787]: listening on IPv4 interface eth0, 187.7.131.36#53
Feb 16 14:31:52 serverlinux named[7787]: generating session key for dynamic DNS
Feb 16 14:31:52 serverlinux named[7787]: set up managed keys zone for view _default, file 'managed-keys.bind'
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 0.IN-ADDR.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 127.IN-ADDR.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 254.169.IN-ADDR.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Feb 16 14:31:52 serverlinux named[7787]: 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
Feb 16 14:31:52 serverlinux named[7787]: 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
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: D.F.IP6.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 8.E.F.IP6.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 9.E.F.IP6.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: A.E.F.IP6.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: B.E.F.IP6.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Feb 16 14:31:52 serverlinux named[7787]: automatic empty zone: 0.1.1.0.0.2.IP6.ARPA
Feb 16 14:31:52 serverlinux named[7787]: command channel listening on 127.0.0.1#953
Feb 16 14:31:52 serverlinux named[7787]: command channel listening on ::1#953
Feb 16 14:31:52 serverlinux named[7787]: the working directory is not writable
Feb 16 14:31:52 serverlinux named[7787]: managed-keys-zone ./IN: loading from master file managed-keys.bind failed: file not found
Feb 16 14:31:52 serverlinux named[7787]: managed-keys-zone ./IN: loaded serial 0
Feb 16 14:31:52 serverlinux named[7787]: running

Na antepenultima linha existe um erro que não sei do que é!

O comando ps -ef | grep named me retorna:

Código: [Selecionar]
root       381  6360  0 11:28 pts/2    00:00:00 grep --color=auto named
bind      7787     1  0 14:31 ?        00:00:00 /usr/sbin/named -u bind
root      8278  2018  0 14:46 pts/0    00:00:00 grep --color=auto named

O comando netstat -atun | grep 53 me retorna:

Código: [Selecionar]
tcp        0      0 187.7.131.36:53         0.0.0.0:*               OUÇA     
tcp        0      0 10.1.1.1:53             0.0.0.0:*               OUÇA     
tcp        0      0 127.0.0.1:53            0.0.0.0:*               OUÇA     
tcp        0      0 127.0.0.1:953           0.0.0.0:*               OUÇA     
tcp6       0      0 ::1:953                 :::*                    OUÇA     
udp        0      0 0.0.0.0:53266           0.0.0.0:*                         
udp        0      0 187.7.131.36:53         0.0.0.0:*                         
udp        0      0 10.1.1.1:53             0.0.0.0:*                         
udp        0      0 127.0.0.1:53            0.0.0.0:*                         
udp        0      0 0.0.0.0:5353            0.0.0.0:*                         
udp6       0      0 :::5353                 :::*

O comando IPTABLES não aceita a cláusula INPUT, por isso mostro abaixo o resultado sem o INPUT:

Código: [Selecionar]
Chain INPUT (policy DROP 1745 packets, 259K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       201.10.120.2         0.0.0.0/0           tcp flags:!0x17/0x02
  453 62415 ACCEPT     udp  --  *      *       201.10.120.2         0.0.0.0/0           
    0     0 ACCEPT     tcp  --  *      *       201.10.128.3         0.0.0.0/0           tcp flags:!0x17/0x02
   65  7493 ACCEPT     udp  --  *      *       201.10.128.3         0.0.0.0/0           
  934  125K ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
   94  4010 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 8 limit: avg 1/sec burst 5
    1    48 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 0 limit: avg 1/sec burst 5
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:33434
  103 11788 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 3
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 3 code 1
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 13
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 14
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 17
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 18
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 5 limit: avg 2/sec burst 5
    1    56 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 4 limit: avg 2/sec burst 5
    0     0 LSI        icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 DROP       all  --  *      *       224.0.0.0/8          0.0.0.0/0           
  183 20108 DROP       all  --  *      *       0.0.0.0/0            224.0.0.0/8         
    0     0 DROP       all  --  *      *       255.255.255.255      0.0.0.0/0           
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0             
  538 26636 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0           state INVALID
    0     0 LSI        all  -f  *      *       0.0.0.0/0            0.0.0.0/0           limit: avg 10/min burst 5
22584 3947K INBOUND    all  --  eth0   *       0.0.0.0/0            0.0.0.0/0           
 1545  102K INBOUND    all  --  eth1   *       0.0.0.0/0            10.1.1.1           
  346 18279 INBOUND    all  --  eth1   *       0.0.0.0/0            187.7.131.36       
 5081  603K INBOUND    all  --  eth1   *       0.0.0.0/0            10.1.1.255         
 1744  259K LOG_FILTER  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 1744  259K LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 6 prefix `Unknown Input'

Chain FORWARD (policy DROP 2 packets, 1104 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    4   240 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 8 limit: avg 1/sec burst 5
    4   240 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 0 limit: avg 1/sec burst 5
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:33434
 2802  256K ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 3
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 3 code 1
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 17
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 18
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 5 limit: avg 2/sec burst 5
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 4 limit: avg 2/sec burst 5
   66  5450 LSI        icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
32571 1574K TCPMSS     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x06/0x02 TCPMSS clamp to PMTU
2010K 2040M OUTBOUND   all  --  eth1   *       0.0.0.0/0            0.0.0.0/0           
 558K  338M ACCEPT     tcp  --  *      *       0.0.0.0/0            10.1.1.0/24         state RELATED,ESTABLISHED
 782K  163M ACCEPT     udp  --  *      *       0.0.0.0/0            10.1.1.0/24         state RELATED,ESTABLISHED
    0     0 LOG_FILTER  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 6 prefix `Unknown Forward'

Chain OUTPUT (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       187.7.131.36         201.10.120.2        tcp dpt:53
  453 33873 ACCEPT     udp  --  *      *       187.7.131.36         201.10.120.2        udp dpt:53
    0     0 ACCEPT     tcp  --  *      *       187.7.131.36         201.10.128.3        tcp dpt:53
   65  4838 ACCEPT     udp  --  *      *       187.7.131.36         201.10.128.3        udp dpt:53
  934  125K ACCEPT     all  --  *      lo      0.0.0.0/0            0.0.0.0/0           
    0     0 DROP       all  --  *      *       224.0.0.0/8          0.0.0.0/0           
    0     0 DROP       all  --  *      *       0.0.0.0/0            224.0.0.0/8         
    0     0 DROP       all  --  *      *       255.255.255.255      0.0.0.0/0           
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0             
    1    40 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0           state INVALID
 3055  436K OUTBOUND   all  --  *      eth0    0.0.0.0/0            0.0.0.0/0           
   69  2418 OUTBOUND   all  --  *      eth1    0.0.0.0/0            0.0.0.0/0           
    0     0 LOG_FILTER  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 6 prefix `Unknown Output'

Chain INBOUND (4 references)
 pkts bytes target     prot opt in     out     source               destination         
 2416 2187K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
  249 93494 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
26891 2390K LSI        all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain LOG_FILTER (5 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain LSI (4 references)
 pkts bytes target     prot opt in     out     source               destination         
26957 2396K LOG_FILTER  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 8953  447K LOG        tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x02 limit: avg 1/sec burst 5 LOG flags 0 level 6 prefix `Inbound '
 9059  452K DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x02
    0     0 LOG        tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x04 limit: avg 1/sec burst 5 LOG flags 0 level 6 prefix `Inbound '
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x04
    0     0 LOG        icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 8 limit: avg 1/sec burst 5 LOG flags 0 level 6 prefix `Inbound '
    0     0 DROP       icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 8
17768 1932K LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           limit: avg 5/sec burst 5 LOG flags 0 level 6 prefix `Inbound '
17898 1944K DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain LSO (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 LOG_FILTER  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           limit: avg 5/sec burst 5 LOG flags 0 level 6 prefix `Outbound '
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable

Chain OUTBOUND (3 references)
 pkts bytes target     prot opt in     out     source               destination         
  127  6873 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
 637K  530M ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
1322K 1506M ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
53472 4154K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

No servidor, se tento navegar ele navega na boa, mas acusa as seguintes linhas no SYSLOG quando entrei no GMAIL:

Código: [Selecionar]
Feb 16 14:48:59 serverlinux named[7787]: error (network unreachable) resolving './NS/IN': 2001:503:ba3e::2:30#53
Feb 16 14:49:01 serverlinux named[7787]: error (network unreachable) resolving 'ocsp.thawte.com/AAAA/IN': 2001:503:a83e::2:30#53
Feb 16 14:49:02 serverlinux named[7787]: error (network unreachable) resolving 'ocsp.verisign.net/AAAA/IN': 2001:503:c27::2:30#53
Feb 16 14:49:02 serverlinux named[7787]: error (network unreachable) resolving 'a2.nstld.com/A/IN': 2001:503:231d::2:30#53
Feb 16 14:49:02 serverlinux named[7787]: error (network unreachable) resolving 'g2.nstld.com/AAAA/IN': 2001:503:a83e::2:31#53
Feb 16 14:49:02 serverlinux named[7787]: error (network unreachable) resolving 'g2.nstld.com/A/IN': 2001:503:83eb::2:31#53

Resultado do comando DIG:

Código: [Selecionar]
root@serverlinux:/etc/bind# dig iparana.org.br @187.7.131.36

; <<>> DiG 9.7.1-P2 <<>> iparana.org.br @187.7.131.36
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 31762
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;iparana.org.br. IN A

;; AUTHORITY SECTION:
org.br. 900 IN SOA a.dns.br. hostmaster.registro.br. 2011021668 1800 900 604800 900

;; Query time: 241 msec
;; SERVER: 187.7.131.36#53(187.7.131.36)
;; WHEN: Wed Feb 16 15:02:41 2011
;; MSG SIZE  rcvd: 94


root@serverlinux:/etc/bind# dig iparana.org.br

; <<>> DiG 9.7.1-P2 <<>> iparana.org.br
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 8229
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;iparana.org.br. IN A

;; AUTHORITY SECTION:
org.br. 855 IN SOA a.dns.br. hostmaster.registro.br. 2011021668 1800 900 604800 900

;; Query time: 0 msec
;; SERVER: 10.1.1.1#53(10.1.1.1)
;; WHEN: Wed Feb 16 15:03:26 2011
;; MSG SIZE  rcvd: 94


root@serverlinux:/etc/bind# dig -x iparana.org.br

; <<>> DiG 9.7.1-P2 <<>> -x iparana.org.br
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 15038
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;br.org.iparana.in-addr.arpa. IN PTR

;; AUTHORITY SECTION:
in-addr.arpa. 10800 IN SOA A.ROOT-SERVERS.NET. dns-ops.ARIN.NET. 2011021604 1800 900 691200 10800

;; Query time: 199 msec
;; SERVER: 10.1.1.1#53(10.1.1.1)
;; WHEN: Wed Feb 16 15:03:48 2011
;; MSG SIZE  rcvd: 112




Teria como dar uma olhada para mim e me ajudar a verificar o porque ele não está resolvendo?

Desde já agradeço sua ajuda!

Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.735
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re: Problemas configuração Bind e Apache
« Resposta #10 Online: 16 de Fevereiro de 2011, 15:23 »
Citação de: rvgugisch
Estou com um problema
Você se importa em aguardar a solução do problema do Master_? ;)
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Offline rvgugisch

  • Usuário Ubuntu
  • *
  • Mensagens: 30
    • Ver perfil
Re: Problemas configuração Bind e Apache
« Resposta #11 Online: 16 de Fevereiro de 2011, 15:27 »
Claro que não, afinal isso aqui é ajuda e não suporte técnico!

Apesar de eu ter uma certa urgência, pois estou nisso há três dias lendo material na net e fazendo todos os exemplos que eu acho na net! E nada de fazer funcionar!

Só espero que o MASTER responda logo para ter o problema solucionado!

Mas, mesmo assim muito obrigado pela ajuda e fico no aguardo!

 ;) :D ;D
« Última modificação: 16 de Fevereiro de 2011, 15:31 por rvgugisch »

Offline Master_

  • Usuário Ubuntu
  • *
  • Mensagens: 221
  • Liberdade, ainda que tardia...
    • Ver perfil
Re: Problemas configuração Bind e Apache
« Resposta #12 Online: 16 de Fevereiro de 2011, 15:33 »
Ok valos lá!


ps -ef | grep named
Código: [Selecionar]
root@servidor:~# ps -ef | grep named
bind       801     1  0 Feb15 ?        00:11:29 /usr/sbin/named -u bind
root     26801 26783  0 12:27 pts/0    00:00:00 grep --color=auto named

netstat -atun | grep 53
Código: [Selecionar]
root@servidor:~# netstat -atun | grep 53
tcp        0      0 66.7.220.134:53         0.0.0.0:*               LISTEN
tcp        0      0 66.7.220.133:53         0.0.0.0:*               LISTEN
tcp        0      0 66.7.220.132:53         0.0.0.0:*               LISTEN
tcp        0      0 66.7.220.131:53         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN
tcp6       0      0 :::53                   :::*                    LISTEN
tcp6       0      0 ::1:953                 :::*                    LISTEN
udp        0      0 66.7.220.134:53         0.0.0.0:*
udp        0      0 66.7.220.133:53         0.0.0.0:*
udp        0      0 66.7.220.132:53         0.0.0.0:*
udp        0      0 66.7.220.131:53         0.0.0.0:*
udp        0      0 127.0.0.1:53            0.0.0.0:*
udp6       0      0 :::53                   :::*

sudo iptables -L -v -n INPUT
Código: [Selecionar]
root@servidor:~# sudo iptables -L -v -n INPUT
Bad argument `INPUT'
Try `iptables -h' or 'iptables --help' for more information.
???

Quanto ao arquivo de Zona, não entendi, é para alterar o arquivo como este exeplo que vc me passou?

Estou enviando um ticket de suporte para o pessoal para que confiram se a porta 53 está liberada. Não há muito suporte para os dedicados, espero que resolvam...

Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.735
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re: Problemas configuração Bind e Apache
« Resposta #13 Online: 16 de Fevereiro de 2011, 16:57 »
Ok valos lá!
ps -ef | grep named
Código: [Selecionar]
root@servidor:~# ps -ef | grep named
bind       801     1  0 Feb15 ?        00:11:29 /usr/sbin/named -u bind
root     26801 26783  0 12:27 pts/0    00:00:00 grep --color=auto named

netstat -atun | grep 53
Código: [Selecionar]
root@servidor:~# netstat -atun | grep 53
tcp        0      0 66.7.220.134:53         0.0.0.0:*               LISTEN
tcp        0      0 66.7.220.133:53         0.0.0.0:*               LISTEN
tcp        0      0 66.7.220.132:53         0.0.0.0:*               LISTEN
tcp        0      0 66.7.220.131:53         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN
tcp6       0      0 :::53                   :::*                    LISTEN
tcp6       0      0 ::1:953                 :::*                    LISTEN
udp        0      0 66.7.220.134:53         0.0.0.0:*
udp        0      0 66.7.220.133:53         0.0.0.0:*
udp        0      0 66.7.220.132:53         0.0.0.0:*
udp        0      0 66.7.220.131:53         0.0.0.0:*
udp        0      0 127.0.0.1:53            0.0.0.0:*
udp6       0      0 :::53                   :::*
Vc está com os IPs dos DNS primário e secundário na mesma máquina? :(

Citar
sudo iptables -L -v -n INPUT
Código: [Selecionar]
root@servidor:~# sudo iptables -L -v -n INPUT
Bad argument `INPUT'
Try `iptables -h' or 'iptables --help' for more information.
???
IPtables e suas pegadinhas. :-[

O comando correto é

iptables -n -v -L INPUT

Citar
Quanto ao arquivo de Zona, não entendi, é para alterar o arquivo como este exeplo que vc me passou?
É uma sugestão; vc não precisa fazer exatamente desse jeito. Mas se vc declarar um nome qq como "NS" da sua zona, esse nome tem que existir.

Citar
Estou enviando um ticket de suporte para o pessoal para que confiram se a porta 53 está liberada. Não há muito suporte para os dedicados, espero que resolvam...
Vc está com o servidor ativo neste momento? Se estiver, a gente pode testar o acesso.
« Última modificação: 16 de Fevereiro de 2011, 17:00 por zekkerj »
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Offline Master_

  • Usuário Ubuntu
  • *
  • Mensagens: 221
  • Liberdade, ainda que tardia...
    • Ver perfil
Re: Problemas configuração Bind e Apache
« Resposta #14 Online: 16 de Fevereiro de 2011, 17:34 »
zekkerj:

1 - Sim, tenho 4 IP's pro dedicado:
66.7.220.131
66.7.220.132
66.7.220.133
66.7.220.134

Até onde entendi usaria os 2 primeiros como dns primario e secundario e os 2 ultimos como reversos, to certo ou errado?

2 - iptables -n -v -L INPUT:
Código: [Selecionar]
root@servidor:~# iptables -n -v -L INPUT
Chain INPUT (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
1283K  175M LOCALINPUT  all  --  !lo    *       0.0.0.0/0            0.0.0.0/0
    4   248 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     udp  --  !lo    *       4.2.2.1              0.0.0.0/0           udp spts:1024:65535 dpt:53
    0     0 ACCEPT     tcp  --  !lo    *       4.2.2.1              0.0.0.0/0           tcp spts:1024:65535 dpt:53
    1   129 ACCEPT     udp  --  !lo    *       4.2.2.1              0.0.0.0/0           udp spt:53 dpts:1024:65535
    0     0 ACCEPT     tcp  --  !lo    *       4.2.2.1              0.0.0.0/0           tcp spt:53 dpts:1024:65535
    0     0 ACCEPT     udp  --  !lo    *       4.2.2.1              0.0.0.0/0           udp spt:53 dpt:53
    0     0 ACCEPT     udp  --  !lo    *       66.7.207.2           0.0.0.0/0           udp spts:1024:65535 dpt:53
    0     0 ACCEPT     tcp  --  !lo    *       66.7.207.2           0.0.0.0/0           tcp spts:1024:65535 dpt:53
    1   129 ACCEPT     udp  --  !lo    *       66.7.207.2           0.0.0.0/0           udp spt:53 dpts:1024:65535
    0     0 ACCEPT     tcp  --  !lo    *       66.7.207.2           0.0.0.0/0           tcp spt:53 dpts:1024:65535
    0     0 ACCEPT     udp  --  !lo    *       66.7.207.2           0.0.0.0/0           udp spt:53 dpt:53
    0     0 ACCEPT     udp  --  !lo    *       66.7.206.2           0.0.0.0/0           udp spts:1024:65535 dpt:53
    0     0 ACCEPT     tcp  --  !lo    *       66.7.206.2           0.0.0.0/0           tcp spts:1024:65535 dpt:53
  489 63186 ACCEPT     udp  --  !lo    *       66.7.206.2           0.0.0.0/0           udp spt:53 dpts:1024:65535
    0     0 ACCEPT     tcp  --  !lo    *       66.7.206.2           0.0.0.0/0           tcp spt:53 dpts:1024:65535
    0     0 ACCEPT     udp  --  !lo    *       66.7.206.2           0.0.0.0/0           udp spt:53 dpt:53
24046 3915K INVALID    tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0
1039K   50M ACCEPT     all  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:20
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:21
   53  2844 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
   18   936 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:25
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:53
   30  1480 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:80
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:110
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:143
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:443
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:465
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:587
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:993
    0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:995
 3333  200K ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:1157
  107  5516 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:10000
    0     0 ACCEPT     udp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:20
    0     0 ACCEPT     udp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:21
   64  3031 ACCEPT     udp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:53
 3720  297K ACCEPT     icmp --  !lo    *       0.0.0.0/0            0.0.0.0/0           icmp type 8 limit: avg 50/sec burst 5
    0     0 ACCEPT     icmp --  !lo    *       0.0.0.0/0            0.0.0.0/0           icmp type 0 limit: avg 50/sec burst 5
    0     0 ACCEPT     icmp --  !lo    *       0.0.0.0/0            0.0.0.0/0           icmp type 11
    2   164 ACCEPT     icmp --  !lo    *       0.0.0.0/0            0.0.0.0/0           icmp type 3
 236K  125M LOGDROPIN  all  --  !lo    *       0.0.0.0/0            0.0.0.0/0

3 - Vou colocar o arquivo da forma q vc me passou então.

4 - Está ativo, o IP principal é 66.7.220.131