<div> </div>
<div>Pessoal, estou enfrentando dúvidas com relação à configuração do servidor dns. </div>
<div> </div>
<div>Cc.: profº Alex e Daniel...</div>
<div> </div>
<div>1 - Topologia:</div>
<div> </div>
<div>Possuo um servidor fedora core 6 x86_64 com o IP <a href="http://192.168.1.1">192.168.1.1</a>, o qual serve de servidor de dados, servidor dhcp e gateway da rede <a href="http://192.168.1.0/28">192.168.1.0/28</a> para rede
<a href="http://10.10.1.0/24">10.10.1.0/24</a>. </div>
<div>Na rede <a href="http://10.10.1.0/24">10.10.1.0/24</a>, existe um servidor dns e dhcp (FreeBSD) com IP <a href="http://10.10.1.253">10.10.1.253</a> - este servidor <strong>não</strong> fui eu quem configurou. </div>
<div>Na rede <a href="http://192.168.1.0/28">192.168.1.0/28</a>, somente existen clientes windows xp sp2, configurados da seguinte maneira:</div>
<div>IP: 192.168.1.x</div>
<div>Mascara: <a href="http://255.255.255.240">255.255.255.240</a></div>
<div>Gateway: <a href="http://192.168.1.1">192.168.1.1</a></div>
<div>DNS Primario: <a href="http://10.10.1.253">10.10.1.253</a></div>
<div>DNS Secundario: não configurado.</div>
<div><br clear="all">2 - Instalação do bind:</div>
<div> </div>
<div>Quando eu instalei o fedora no servidor, achei que não iria precisar de servidor dns, pois o FreeBSD já fazia este trabalho. Portanto eu não instalei o bind a partir da instalação do Fedora. Fiz a instalação dele a partir do yum. Instalei os seguintes pacotes:
</div>
<div> </div>
<div>bind-libs-9.3.4-3.fc6<br>bind-utils-9.3.4-3.fc6<br>bind-chroot-9.3.4-3.fc6<br>bind-9.3.4-3.fc6</div>
<div> </div>
<div> </div>
<div>3 - Configuração do bind:</div>
<div> </div>
<div>O dominio que eu quero configurar é: <strong><a href="http://sme.gov.br">sme.gov.br</a></strong></div>
<div>O nome do servidor fedora é: <strong>srv-sme</strong></div>
<div> </div>
<div>Eu li diversos faqs e artigos sobre configuração do bind, e até mesmo já tive aula na faculdade sobre a configuração do mesmo. Notei que no fedora, as coisas são diferentes:</div>
<div>O bind roda em modo chroot (jail), para fins de proteção contra invasão. Portanto, os arquivos de configuração estão localizados em locais diferentes do padrão. Até ai tudo bem.</div>
<div> </div>
<div>Mas tem uma coisa: a instalação do bind <strong>não</strong> cria o <strong>named.conf</strong>. Quando eu mandei iniciar o serviço (service bind start), ele disse pra mim o seguinte:</div>
<div> </div>
<div><em>I can't find any configuration file. You can create it by system-config-bind or install caching-nameserver.<br></em></div>
<div>Então eu instalei o: <strong>caching-nameserver-9.3.4-3.fc6</strong></div>
<div> </div>
<div>Agora o serviço funcionou: service bind start [ ok ]</div>
<div> </div>
<div>Porém, ainda sim o arquivo <strong>named.conf não existe</strong>. Notei então que tem um tal de <strong>named.caching-nameserver.conf </strong>localizado no diretório:<strong> /var/named/chroot/etc/ </strong>o qual possui o seguinte conteúdo:
</div>
<div> </div>
<div>//<br>// named.caching-nameserver.conf<br>//<br>// Provided by Red Hat caching-nameserver package to configure the<br>// ISC BIND named(8) DNS server as a caching only nameserver<br>// (as a localhost DNS resolver only).
<br>//<br>// See /usr/share/doc/bind*/sample/ for example named configuration files.<br>//<br>// DO NOT EDIT THIS FILE - use system-config-bind or an editor<br>// to create named.conf - edits to this file will be lost on<br>
// caching-nameserver package upgrade.<br>//<br>options {<br> listen-on port 53 { <a href="http://127.0.0.1">127.0.0.1</a>; };<br> listen-on-v6 port 53 { ::1; };<br> directory "/var/named";
<br> dump-file "/var/named/data/cache_dump.db";<br> statistics-file "/var/named/data/named_stats.txt";<br> memstatistics-file "/var/named/data/named_mem_stats.txt";
<br> query-source port 53;<br> query-source-v6 port 53;<br> allow-query { localhost; };<br>};<br>logging {<br> channel default_debug {<br> file "data/named.run";
<br> severity dynamic;<br> };<br>};<br>view localhost_resolver {<br> match-clients { localhost; };<br> match-destinations { localhost; };<br> recursion yes;<br> include "/etc/named.rfc1912.zones";
<br>};<br> </div>
<div>Achei esse arquivo muito parecido com o named.conf, então resolvi colocar no final dele os parâmetros de configuração do meu dominio para o servidor dns, que são estes citados abaixo:</div>
<div> </div>
<div>zone "<a href="http://sme.gov.br">sme.gov.br</a>" {<br> type master;<br> file "sme.zone";<br> allow-update { none; };<br>};<br>zone "1.168.192.in-addr.arpa" {
<br> type master;<br> file "sme.rev";<br> allow-update { none; };<br>};<br> </div>
<div>Criei os arquivos <strong>sme.zone</strong> e <strong>sme.rev </strong>no diretorio: <strong>/var/named/chroot/var/named, </strong>que passou a ter o seguinte conteúdo:</div>
<div> </div>
<div>drwxrwx--- 2 named named 4,0K Mar 6 11:24 data<br>-rw-r----- 1 root named 198 Fev 26 10:07 localdomain.zone<br>-rw-r----- 1 root named 195 Fev 26 10:07 localhost.zone<br>-rw-r----- 1 root named 427 Fev 26 10:07
named.broadcast<br>-rw-r----- 1 root named 2,5K Fev 26 10:07 <a href="http://named.ca">named.ca</a><br>-rw-r----- 1 root named 424 Fev 26 10:07 named.ip6.local<br>-rw-r----- 1 root named 426 Fev 26 10:07 named.local<br>
-rw-r----- 1 root named 427 Fev 26 10:07 named.zero<br>drwxrwx--- 2 named named 4,0K Jul 27 2004 slaves<br><em>-rw-r--r-- 1 root root 498 Mar 6 14:52 sme.rev<br>-rw-r--r-- 1 root root 784 Mar 6 14:51 sme.zone</em>
</div>
<div><em></em> </div>
<div>Conteúdo do diretório <strong>/var/named/chroot/etc</strong>:</div>
<div> </div>
<div>-rw-r--r-- 1 root root 721 Nov 28 2000 localtime<br>-rw-r----- 1 root named 1,3K Mar 6 14:49 named.caching-nameserver.conf<br>-rw-r----- 1 root named 955 Fev 26 10:07 named.rfc1912.zones<br>-rw-r--r-- 1 root named 113 Mar 6 11:19
rndc.key<br> </div>
<div>Conteúdo do arquivo <strong>/var/named/chroot/var/named/</strong><strong>sme.zone:</strong></div>
<div>$TTL 86400<br>@ IN SOA @ <a href="http://webmaster.sme.gov.br">webmaster.sme.gov.br</a>. (<br> 2007030501 ; serial
<br> 3H ; refresh<br> 15M ; retry<br> 1W ; expiry
<br> 1D ) ; minimum<br>@ IN NS <a href="http://srv-sme.sme.gov.br">srv-sme.sme.gov.br</a>.<br>@ IN A
<a href="http://192.168.1.1">192.168.1.1</a><br>www IN CNAME <a href="http://sme.gov.br">sme.gov.br</a>.<br>ftp IN CNAME <a href="http://sme.gov.br">sme.gov.br
</a>.<br>mail IN CNAME <a href="http://sme.gov.br">sme.gov.br</a>.<br>@ IN MX 5 <a href="http://srv-sme.sme.gov.br">srv-sme.sme.gov.br</a>.<br> </div>
<div>Conteúdo do arquivo <strong>/var/named/chroot/var/named/</strong><strong>sme.rev:</strong></div>
<div> </div>
<div>$TTL 86400<br>@ IN SOA 1.168.192.in-addr.arpa. webmaster.1.168.192.in-addr.arpa. (<br> 2007030501 ; Serial<br> 28800 ; Refresh
<br> 14400 ; Retry<br> 3600000 ; Expire<br> 86400 ) ; Minimum<br> IN NS <a href="http://srv-sme.sme.gov.br">
srv-sme.sme.gov.br</a>.<br> IN A <a href="http://192.168.1.1">192.168.1.1</a><br>1 IN PTR <a href="http://srv-sme.sme.gov.br">srv-sme.sme.gov.br</a>.<br> </div>
<div>Conteúdo do arquivo <strong>/etc/hosts</strong>:</div>
<div> </div>
<div># Do not remove the following line, or various programs<br># that require network functionality will fail.<br><a href="http://127.0.0.1">127.0.0.1</a> localhost.localdomain localhost<br> </div>
<div>Conteúdo do arquivo <strong><strong>/etc/host.conf</strong>:</strong></div>
<div> </div>
<div>order bind,hosts<br>multi on<br> </div>
<div>Conteúdo do arquivo <strong><strong>/etc/hosts.allow</strong>:</strong></div>
<div> </div>
<div>#<br># hosts.allow This file describes the names of the hosts which are<br># allowed to use the local INET services, as decided<br># by the '/usr/sbin/tcpd' server.<br>#<br> </div>
<div>
<div>Conteúdo do arquivo <strong><strong>/etc/hosts.deny</strong>:</strong></div></div>
<div> </div>
<div>#<br># hosts.deny This file describes the names of the hosts which are<br># *not* allowed to use the local INET services, as decided<br># by the '/usr/sbin/tcpd' server.<br>#<br>
# The portmap line is redundant, but it is left to remind you that<br># the new secure portmap uses hosts.deny and hosts.allow. In particular<br># you should know that NFS uses portmap!</div>
<div>
<p>Conteúdo do arquivo <strong>/etc/resolv.conf</strong>:</p></div>
<div>#search <a href="http://sme.gov.br">sme.gov.br</a><br>#nameserver <a href="http://192.168.1.1">192.168.1.1</a><br> </div>
<div>Conteúdo do arquivo <strong>/etc/sysconfig/network:</strong></div>
<div> </div>
<div>NETWORKING=yes<br>NETWORKING_IPV6=yes<br>HOSTNAME=srv-sme<br>GATEWAY=<a href="http://10.10.1.253">10.10.1.253</a><br> </div>
<div>Bom, após mexer nisso tudo, eu coloquei o serviço do bind (named) na inicialização através do comando ntsysv e reiniciei o servidor.</div>
<div> </div>
<div>O named inicia normalmente, porém o servidor dns não funciona. Fiz os seguintes testes:</div>
<div> </div>
<div>[root@srv-sme named]#ping <a href="http://srv-sme.sme.org.br">srv-sme.sme.org.br</a></div>
<div>ping: unknown host <a href="http://srv-sme.sme.org.br">srv-sme.sme.org.br</a></div>
<div> </div>
<div>[root@srv-sme etc]# ping <a href="http://www.sme.gov.br/">www.sme.gov.br</a><br>ping: unknown host <a href="http://www.sme.gov.br">www.sme.gov.br</a><br> </div>
<div>[root@srv-sme etc]# ping <a href="http://mail.sme.gov.br">mail.sme.gov.br</a><br>ping: unknown host <a href="http://mail.sme.gov.br">mail.sme.gov.br</a><br> </div>
<div>[root@srv-sme etc]# ping <a href="ftp://ftp.sme.gov.br/">ftp.sme.gov.br</a><br>ping: unknown host <a href="ftp://ftp.sme.gov.br/">ftp.sme.gov.br</a><br> </div>
<div>[root@srv-sme named]#ping <a href="http://www.terra.com.br">www.terra.com.br</a></div>
<div>ping: unknown host <a href="http://www.terra.com.br">www.terra.com.br</a></div>
<div> </div>
<div>[root@srv-sme named]# ping <a href="http://192.168.1.1">192.168.1.1</a><br>PING <a href="http://192.168.1.1">192.168.1.1</a> (<a href="http://192.168.1.1">192.168.1.1</a>) 56(84) bytes of data.<br>64 bytes from <a href="http://192.168.1.1">
192.168.1.1</a>: icmp_seq=1 ttl=64 time=0.079 ms<br> </div>
<div>Reiniciei o serviço named com: service named restart, mas continou não funcionando e apresentado o mesmo problema acima citado</div>
<div> </div>
<div><u><strong>Pergunta 1: fiz algo de errado?</strong></u></div>
<div><u><strong></strong></u> </div>
<div><u><strong>Pergunta 2: falta alguma coisa pra configurar?</strong></u></div>
<div><u><strong></strong></u> </div>
<div><u><strong>Pergunta 3: falta algo mais pra instalar?</strong></u></div>
<div> </div>
<div> </div>
<div>Alguém pode me ajudar?</div>
<div> </div>
<div>Aguardo resposta</div>
<div><br>-- <br>Bruno Galindro da Costa<br><a href="mailto:bruno.galindro@gmail.com">bruno.galindro@gmail.com</a><br>(48)8826-3430<br>(48)3255-2671<br>Imbituba - SC </div>