From owner-svn-doc-all@freebsd.org Sun Sep 16 01:21:27 2018 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21879108FF8E; Sun, 16 Sep 2018 01:21:27 +0000 (UTC) (envelope-from ebrandi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAA4B7827F; Sun, 16 Sep 2018 01:21:26 +0000 (UTC) (envelope-from ebrandi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C544D1B3EE; Sun, 16 Sep 2018 01:21:26 +0000 (UTC) (envelope-from ebrandi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8G1LQpx068009; Sun, 16 Sep 2018 01:21:26 GMT (envelope-from ebrandi@FreeBSD.org) Received: (from ebrandi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8G1LQje068006; Sun, 16 Sep 2018 01:21:26 GMT (envelope-from ebrandi@FreeBSD.org) Message-Id: <201809160121.w8G1LQje068006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ebrandi set sender to ebrandi@FreeBSD.org using -f From: Edson Brandi Date: Sun, 16 Sep 2018 01:21:26 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r52261 - in head/pt_BR.ISO8859-1/articles: . filtering-bridges X-SVN-Group: doc-head X-SVN-Commit-Author: ebrandi X-SVN-Commit-Paths: in head/pt_BR.ISO8859-1/articles: . filtering-bridges X-SVN-Commit-Revision: 52261 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2018 01:21:27 -0000 Author: ebrandi Date: Sun Sep 16 01:21:25 2018 New Revision: 52261 URL: https://svnweb.freebsd.org/changeset/doc/52261 Log: pt_BR.ISO8859-1/articles/filtering-bridges: New pt_BR translation into .po format * content synchronized with en_US document (rev 44681) * article.xml converted to .po * .po file was translated to pt_BR * .po and .xml file has been set to UTF-8 encoding * information about volunteers who translated and/or revised the document was added to the header of the .po file Approved by: gabor (mentor, implicit) Obtained from: The FreeBSD Brazilian Portuguese Documentation Project Added: head/pt_BR.ISO8859-1/articles/filtering-bridges/ head/pt_BR.ISO8859-1/articles/filtering-bridges/Makefile (contents, props changed) head/pt_BR.ISO8859-1/articles/filtering-bridges/article.xml (contents, props changed) head/pt_BR.ISO8859-1/articles/filtering-bridges/pt_BR.po (contents, props changed) Modified: head/pt_BR.ISO8859-1/articles/Makefile Modified: head/pt_BR.ISO8859-1/articles/Makefile ============================================================================== --- head/pt_BR.ISO8859-1/articles/Makefile Sat Sep 15 17:33:40 2018 (r52260) +++ head/pt_BR.ISO8859-1/articles/Makefile Sun Sep 16 01:21:25 2018 (r52261) @@ -10,6 +10,7 @@ SUBDIR+= building-products SUBDIR+= contributing SUBDIR+= cups SUBDIR+= explaining-bsd +SUBDIR+= filtering-bridges SUBDIR+= fonts SUBDIR+= freebsd-questions SUBDIR+= freebsd-update-server Added: head/pt_BR.ISO8859-1/articles/filtering-bridges/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/pt_BR.ISO8859-1/articles/filtering-bridges/Makefile Sun Sep 16 01:21:25 2018 (r52261) @@ -0,0 +1,24 @@ +# +# The FreeBSD Documentation Project +# The FreeBSD Brazilian Portuguese Documentation Project +# +# $FreeBSD$ +# +# Article: Filtering Bridges + +MAINTAINER=ebrandi@FreeBSD.org + +DOC?= article + +FORMATS?= html html-split +WITH_ARTICLE_TOC?= YES + +INSTALL_COMPRESSED?= gz +INSTALL_ONLY_COMPRESSED?= + +SRCS= article.xml + +URL_RELPREFIX?= ../../../.. +DOC_PREFIX?= ${.CURDIR}/../../.. + +.include "${DOC_PREFIX}/share/mk/doc.project.mk" Added: head/pt_BR.ISO8859-1/articles/filtering-bridges/article.xml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/pt_BR.ISO8859-1/articles/filtering-bridges/article.xml Sun Sep 16 01:21:25 2018 (r52261) @@ -0,0 +1,200 @@ + + +
+ Pontes de Filtragem (Filtering Bridges) + + + + AlexDupre
ale@FreeBSD.org
+
+ + + FreeBSD is a registered trademark of the FreeBSD Foundation. + 3Com and HomeConnect are registered trademarks of 3Com Corporation. + Intel, Celeron, Centrino, Core, EtherExpress, i386, i486, Itanium, Pentium, and Xeon are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. + Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this document, and the FreeBSD Project was aware of the trademark claim, the designations have been followed by the or the ® symbol. + + + $FreeBSD$ + + $FreeBSD$ + + + Geralmente, é útil dividir uma rede física (como uma Ethernet) em dois segmentos separados, sem precisar criar sub-redes, e usar um roteador para vinculá-los. O dispositivo que conecta as duas redes dessa maneira é chamado de ponte (bridge). Um sistema FreeBSD com duas interfaces de rede é suficiente para atuar como uma ponte. + + Uma ponte funciona examinando os endereços do nível MAC (endereços Ethernet) dos dispositivos conectados a cada uma de suas interfaces de rede e encaminhando o tráfego entre as duas redes apenas se a origem e o destino estiverem em diferentes segmentos. Sob muitos pontos de vista, uma ponte é semelhante a um switch Ethernet com apenas duas portas. + +
+ + + Por que usar uma ponte de filtragem? + + Cada vez mais frequentemente, graças aos custos reduzidos de conexões de banda larga à Internet (xDSL) e também devido à redução de endereços IPv4 disponíveis, muitas empresas estão conectadas à Internet 24 horas por dia e com poucos (às vezes nem mesmo 2) endereços IP. Nestas situações, geralmente é desejável ter um firewall que filtre o tráfego de entrada e de saída de e para a Internet, mas uma solução de filtragem de pacotes baseada em roteador pode não ser aplicável, quer seja devido a problemas de sub-redes, quer seja porque o roteador é de propriedade do provedor de conectividade (ISP), ou porque ele não suporta tais funcionalidades. Nestes cenários, o uso de uma ponte de filtragem é altamente recomendado. + + Um firewall baseado em uma ponte de filtragem pode ser configurado e inserido entre o roteador xDSL e seu hub/switch Ethernet sem causar nenhum problema de numeração IP. + + + + Como instalar + + Adicionar funcionalidades de bridge a um sistema FreeBSD não é difícil. Desde a versão 4.5 é possível carregar tais funcionalidades como módulos ao invés de ter que reconstruir o kernel, simplificando bastante o procedimento. Nas subseções seguintes, explicarei as duas formas de instalação. + + + Não siga as duas instruções: um procedimento exclui o outro. Selecione a melhor opção de acordo com suas necessidades e habilidades. + + + Antes de continuar, certifique-se de ter pelo menos duas placas Ethernet compatíveis com o modo promíscuo para recepção e transmissão, pois elas devem ser capazes de enviar pacotes Ethernet com qualquer endereço, não apenas o deles. Além disso, para ter uma boa taxa de transferência, as placas devem ser placas do barramento PCI. As melhores opções ainda são as Intel EtherExpress Pro, seguido pela série 3Com 3c9xx. Para simplificar a configuração do firewall, pode ser útil ter duas placas de diferentes fabricantes (usando drivers diferentes) para distinguir claramente qual interface está conectada ao roteador e qual está conectada à rede interna. + + + Configuração do Kernel + + Então você decidiu usar o método de instalação mais antigo, e também o mais bem testado. Para começar, você precisa adicionar as seguintes linhas ao seu arquivo de configuração do kernel: + + options BRIDGE +options IPFIREWALL +options IPFIREWALL_VERBOSE + + A primeira linha adiciona o suporte para o serviço de ponte (bridge), a segunda adiciona o suporte ao firewall e a terceira é referente as funções de registro do firewall. + + Agora é necessário compilar e instalar o novo kernel. Você pode encontrar instruções detalhadas na seção Compilando e Instalando um Kernel Personalizado do Handbook do FreeBSD. + + + + Carregamento de módulos + + Se você escolheu usar o método de instalação mais novo e mais simples, a única coisa a fazer agora é adicionar a seguinte linha ao /boot/loader.conf: + + bridge_load="YES" + + Desta forma, durante a inicialização do sistema, o módulo bridge.ko será carregado junto com o kernel. Não é necessário adicionar uma linha semelhante para o módulo ipfw.ko, pois ele será carregado automaticamente após a execução das etapas na seção a seguir. + + + + + Preparação final + + Antes de reinicializar para carregar o novo kernel ou os módulos requeridos (de acordo com o método de instalação escolhido anteriormente), você deve fazer algumas alterações no arquivo de configuração /etc/rc.conf. A regra padrão do firewall é rejeitar todos os pacotes IP. Inicialmente vamos configurar um firewall (aberto), a fim de verificar sua operação sem qualquer problema relacionado à filtragem de pacotes (no caso de você executar este procedimento remotamente, tal configuração evitará que você permaneça isolado da rede). Coloque estas linhas no /etc/rc.conf: + + firewall_enable="YES" +firewall_type="open" +firewall_quiet="YES" +firewall_logging="YES" + + A primeira linha ativará o firewall (e carregará o módulo ipfw.ko se ele não estiver compilado no kernel), a segunda irá configurá-lo no modo (como explicado em /etc/rc.firewall), a terceira para não mostrar o carregamento de regras e a quarta para ativar o suporte aos logs. + + Sobre a configuração das interfaces de rede, a maneira mais usada é atribuir um IP a apenas uma das placas de rede, mas a ponte funcionará igualmente, mesmo que ambas as interfaces ou nenhuma tenha um IP configurado. No último caso (IP-less) a máquina bridge ficará ainda mais oculta, e também inacessível pela rede: para configurá-la será necessário efetuar o login a partir do console ou através de uma terceira interface de rede separada da ponte. Às vezes, durante a inicialização do sistema, alguns programas exigem acesso à rede, digamos, para resolução de nomes de domínio: neste caso, é necessário atribuir um IP à interface externa (aquela conectada à Internet, onde o servidor DNS se encontra), uma vez que a ponte será ativada no final do procedimento de inicialização. Isso significa que a interface fxp0 (no nosso caso) deve ser mencionada na seção ifconfig do arquivo /etc/rc.conf, e nquanto o xl0 não é. Atribuir um IP a ambas as placas de rede não faz muito sentido, a menos que, durante o procedimento de inicialização, os aplicativos acessem os serviços em ambos os segmentos de Ethernet. + + Há outra coisa importante a saber. Ao executar o IP sobre Ethernet, existem dois protocolos Ethernet em uso: um é o IP, o outro é o ARP. O ARP faz a conversão do endereço IP de um host em seu endereço Ethernet (camada MAC). Para permitir a comunicação entre dois hosts separados pela ponte, é necessário que a ponte envie pacotes ARP. Esse protocolo não está incluído na camada IP, uma vez que ele existe apenas com IP sobre Ethernet. O firewall do FreeBSD filtra exclusivamente na camada IP e, portanto, todos os pacotes não-IP (ARP incluso) serão encaminhados sem serem filtrados, mesmo que o firewall esteja configurado para não permitir nada. + + Agora é hora de reiniciar o sistema e usá-lo como antes: haverá algumas novas mensagens sobre a ponte e o firewall, mas a ponte não será ativada e o firewall, estando no modo , não evitará operações. + + Se houver algum problema, você deve resolvê-los agora antes de prosseguir. + + + + Habilitando a ponte + + Neste ponto, para habilitar a ponte, você tem que executar os seguintes comandos (tendo a perspicácia para substituir os nomes das duas interfaces de rede fxp0 e xl0 com as suas próprias): + + # sysctl net.link.ether.bridge.config=fxp0:0,xl0:0 +# sysctl net.link.ether.bridge.ipfw=1 +# sysctl net.link.ether.bridge.enable=1 + + A primeira linha especifica quais interfaces devem ser ativadas pela ponte, a segunda habilitará o firewall na ponte e, finalmente, a terceira habilitará a ponte. + + + Se você tem o FreeBSD 5.1-RELEASE ou anterior, as variáveis do sysctl são escritas de forma diferente. Veja bridge4 para detalhes. + + + Neste ponto você deve ser capaz de inserir a máquina entre dois conjuntos de hosts sem comprometer quaisquer habilidades de comunicação entre eles. Em caso afirmativo, o próximo passo é adicionar as partes net.link.ether.bridge.[blah]=[blah] dessas linhas ao arquivo /etc/sysctl.conf, para que eles sejam executados na inicialização. + + + + Configurando o Firewall + + Agora é hora de criar seu próprio arquivo com regras de firewall personalizadas, a fim de proteger a rede interna. Haverá alguma complicação em fazer isso porque nem todas as funcionalidades do firewall estão disponíveis em pacotes em ponte. Além disso, há uma diferença entre os pacotes que estão sendo encaminhados e os pacotes que estão sendo recebidos pela máquina local. Em geral, os pacotes de entrada passam pelo firewall apenas uma vez, não duas vezes, como é normalmente o caso; na verdade eles são filtrados somente após o recebimento, portanto, as regras que usam ou nunca darão match. Pessoalmente, eu uso que é uma sintaxe antiga, mas uma que tem sentido quando você a lê. Outra limitação é que você está restrito a usar somente comandos ou para os pacotes filtrados por uma ponte. Coisas sofisticadas como , forwar ou não estão disponíveis. Essas opções ainda podem ser usadas, mas apenas no tráfego para ou a partir da própria máquina ponte (se ela tiver um endereço IP). + + O conceito de filtragem stateful é novo no FreeBSD 4.0. Esta é uma grande melhoria para o tráfego UDP, que normalmente é um pedido que sai, seguido pouco depois por uma resposta com exatamente o mesmo conjunto de endereços IP e números de porta (mas com origem e destino invertidos, é claro). Para firewalls que não possuem manutenção de estado, quase não há como lidar com esse tipo de tráfego como uma sessão única. Mas com um firewall que pode lembrar de um pacote UDP de saída e, nos próximos minutos, permitir uma resposta, o manuseio de serviços UDP é trivial. O exemplo a seguir mostra como fazer isso. É possível fazer a mesma coisa com pacotes TCP. Isso permite que você evite alguns ataques de negação de serviço e outros truques desagradáveis, mas também faz com que sua tabela de estado cresça rapidamente em tamanho. + + Vamos ver um exemplo de configuração. Note primeiro que no topo do /etc/rc.firewall já existem regras padrão para a interface de loopback lo0, então não devemos mais precisar delas. Regras customizadas devem ser colocadas em um arquivo separado (digamos, /etc/rc.firewall.local) e carregadas na inicialização do sistema, modificando a linha de /etc/rc.conf onde definimos o firewall : + + firewall_type="/etc/rc.firewall.local" + + + Você tem que especificar o caminho completo, caso contrário ele não será carregado com o risco de permanecer isolado da rede. + + + Para nosso exemplo, imagine ter a interface fxp0 conectada para o exterior (Internet) e a xl0 para o interior (LAN). A máquina ponte tem o IP 1.2.3.4 (não é possível que o seu ISP possa lhe dar um endereço assim, mas para nosso exemplo ele é bom). + + # Things that we have kept state on before get to go through in a hurry +add check-state + +# Throw away RFC 1918 networks +add drop all from 10.0.0.0/8 to any in via fxp0 +add drop all from 172.16.0.0/12 to any in via fxp0 +add drop all from 192.168.0.0/16 to any in via fxp0 + +# Allow the bridge machine to say anything it wants +# (if the machine is IP-less do not include these rows) +add pass tcp from 1.2.3.4 to any setup keep-state +add pass udp from 1.2.3.4 to any keep-state +add pass ip from 1.2.3.4 to any + +# Allow the inside hosts to say anything they want +add pass tcp from any to any in via xl0 setup keep-state +add pass udp from any to any in via xl0 keep-state +add pass ip from any to any in via xl0 + +# TCP section +# Allow SSH +add pass tcp from any to any 22 in via fxp0 setup keep-state +# Allow SMTP only towards the mail server +add pass tcp from any to relay 25 in via fxp0 setup keep-state +# Allow zone transfers only by the slave name server [dns2.nic.it] +add pass tcp from 193.205.245.8 to ns 53 in via fxp0 setup keep-state +# Pass ident probes. It is better than waiting for them to timeout +add pass tcp from any to any 113 in via fxp0 setup keep-state +# Pass the "quarantine" range +add pass tcp from any to any 49152-65535 in via fxp0 setup keep-state + +# UDP section +# Allow DNS only towards the name server +add pass udp from any to ns 53 in via fxp0 keep-state +# Pass the "quarantine" range +add pass udp from any to any 49152-65535 in via fxp0 keep-state + +# ICMP section +# Pass 'ping' +add pass icmp from any to any icmptypes 8 keep-state +# Pass error messages generated by 'traceroute' +add pass icmp from any to any icmptypes 3 +add pass icmp from any to any icmptypes 11 + +# Everything else is suspect +add drop log all from any to any + + Aqueles de vocês que já configuraram firewalls antes podem notar algumas coisas que estão faltando. Em particular, não há regras anti-spoofing, na verdade nós não adicionamos: + + add deny all from 1.2.3.4/8 to any in via fxp0 + + Ou seja, dropar os pacotes que estão vindo do lado de fora dizendo ser da nossa rede. Isso é algo que você normalmente faria para ter certeza de que alguém não tentaria escapar do filtro de pacotes, gerando pacotes nefastos que parecem ser de dentro. O problema é que existe pelo menos um host na interface externa que você não deseja ignorar: o roteador. Mas geralmente ISP tem anti-spoofs em seu roteador, então não precisamos nos incomodar muito. + + A última regra parece ser uma duplicata exata da regra padrão, ou seja, não deixa passar nada que não seja especificamente permitido. Mas há uma diferença: todo tráfego suspeito será registrado. + + Existem duas regras para passar o tráfego SMTP e o do DNS para o servidor de e-mail e o servidor de nomes, se você os tiver. Obviamente, todo o conjunto de regras deve ser definido de acordo com as suas preferências pessoais, isso é apenas um exemplo específico (o formato da regra é descrito com precisão na página de manual do ipfw8 ). Note que, para que o relay e o ns funcionem, as pesquisas de serviço de nomes devem funcionar antes da ponte ser ativada. Este é um exemplo de quando você precisa ter certeza de que definiu o IP na placa de rede correta. Como alternativa, é possível especificar o endereço IP em vez do nome do host (necessário se a máquina não tiver IP). + + As pessoas que estão acostumadas a configurar firewalls provavelmente também estão acostumadas a ter uma regra ou para pacotes ident (TCP porta 113). Infelizmente, esta não é uma opção aplicável com a ponte, então o melhor é simplesmente passá-las ao seu destino. Enquanto essa máquina de destino não estiver executando um daemon ident, isso é relativamente inofensivo. A alternativa é descartar as conexões na porta 113, o que criará alguns problemas com serviços como por exemplo o IRC (o probe do ident irá dar timeout). + + A única outra coisa que é um pouco estranha e que você pode ter notado é que existe uma regra para deixar a máquina ponte falar, e outra para os hosts internos. Lembre-se que isso ocorre porque os dois conjuntos de tráfego terão caminhos diferentes através do kernel e do filtro de pacotes. A rede interna passará pela ponte, enquanto a máquina local usará a pilha IP normal para falar. Assim, as duas regras lidam com casos diferentes. As regras in via fxp0 funcionam nos dois caminhos. Em geral, se você usar as regras em todo o filtro, precisará abrir uma exceção para pacotes gerados localmente, porque eles não vieram em nenhuma de nossas interfaces. + + + + Colaboradores + + Muitas partes deste artigo foram tiradas, atualizadas e adaptadas de um texto antigo sobre pontes, editado por Nick Sayer. Um par de inspirações deve-se a uma introdução sobre pontes de Steve Peterson. + + Um grande obrigado ao Luigi Rizzo pela implementação do código de ponte (bridge) no FreeBSD e pelo tempo que ele dedicou a mim respondendo a todas as minhas perguntas relacionadas. + + Agradeço também a Tom Rhodes, que olhou para o meu trabalho de tradução do italiano (a língua original deste artigo) para o inglês. + +
Added: head/pt_BR.ISO8859-1/articles/filtering-bridges/pt_BR.po ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/pt_BR.ISO8859-1/articles/filtering-bridges/pt_BR.po Sun Sep 16 01:21:25 2018 (r52261) @@ -0,0 +1,887 @@ +# $FreeBSD$ +# Danilo G. Baio , 2018. #zanata +# Edson Brandi , 2018. #zanata +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2018-09-16 01:16+0000\n" +"PO-Revision-Date: 2018-09-16 01:04+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Zanata 4.6.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" + +#. Put one translator per line, in the form NAME , YEAR1, YEAR2 +msgctxt "_" +msgid "translator-credits" +msgstr "" +"Edson Brandi, ebrandi@FreeBSD.org, 2018\n" +"Danilo G. Baio, dbaio@FreeBSD.org, 2018" + +#. (itstool) path: info/title +#: article.translate.xml:4 +msgid "Filtering Bridges" +msgstr "Pontes de Filtragem (Filtering Bridges)" + +#. (itstool) path: affiliation/address +#: article.translate.xml:9 +#, no-wrap +msgid "ale@FreeBSD.org" +msgstr "ale@FreeBSD.org" + +#. (itstool) path: authorgroup/author +#: article.translate.xml:8 +msgid "" +"AlexDupre <_:address-1/> " +msgstr "" +"AlexDupre <_:address-1/> " + +#. (itstool) path: legalnotice/para +#: article.translate.xml:14 +msgid "FreeBSD is a registered trademark of the FreeBSD Foundation." +msgstr "FreeBSD is a registered trademark of the FreeBSD Foundation." + +#. (itstool) path: legalnotice/para +#: article.translate.xml:16 +msgid "3Com and HomeConnect are registered trademarks of 3Com Corporation." +msgstr "3Com and HomeConnect are registered trademarks of 3Com Corporation." + +#. (itstool) path: legalnotice/para +#: article.translate.xml:18 +msgid "" +"Intel, Celeron, Centrino, Core, EtherExpress, i386, i486, Itanium, Pentium, " +"and Xeon are trademarks or registered trademarks of Intel Corporation or its " +"subsidiaries in the United States and other countries." +msgstr "" +"Intel, Celeron, Centrino, Core, EtherExpress, i386, i486, Itanium, Pentium, " +"and Xeon are trademarks or registered trademarks of Intel Corporation or its " +"subsidiaries in the United States and other countries." + +#. (itstool) path: legalnotice/para +#: article.translate.xml:22 +msgid "" +"Many of the designations used by manufacturers and sellers to distinguish " +"their products are claimed as trademarks. Where those designations appear in " +"this document, and the FreeBSD Project was aware of the trademark claim, the " +"designations have been followed by the or the ® symbol." +msgstr "" +"Many of the designations used by manufacturers and sellers to distinguish " +"their products are claimed as trademarks. Where those designations appear in " +"this document, and the FreeBSD Project was aware of the trademark claim, the " +"designations have been followed by the or the ® symbol." + +#. (itstool) path: info/pubdate +#. (itstool) path: info/releaseinfo +#: article.translate.xml:30 article.translate.xml:32 +msgid "" +"$FreeBSD: head/en_US.ISO8859-1/articles/filtering-bridges/article.xml 44681 " +"2014-04-28 20:19:20Z wblock $" +msgstr "$FreeBSD$" + +#. (itstool) path: abstract/para +#: article.translate.xml:35 +msgid "" +"Often it is useful to divide one physical network (like an Ethernet) into " +"two separate segments without having to create subnets, and use a router to " +"link them together. The device that connects the two networks in this way is " +"called a bridge. A FreeBSD system with two network interfaces is enough in " +"order to act as a bridge." +msgstr "" +"Geralmente, é útil dividir uma rede física (como uma Ethernet) em dois " +"segmentos separados, sem precisar criar sub-redes, e usar um roteador para " +"vinculá-los. O dispositivo que conecta as duas redes dessa maneira é chamado " +"de ponte (bridge). Um sistema FreeBSD com duas interfaces de rede é " +"suficiente para atuar como uma ponte." + +#. (itstool) path: abstract/para +#: article.translate.xml:41 +msgid "" +"A bridge works by scanning the addresses of MAC level " +"(Ethernet addresses) of the devices connected to each of its network " +"interfaces and then forwarding the traffic between the two networks only if " +"the source and the destination are on different segments. Under many points " +"of view a bridge is similar to an Ethernet switch with only two ports." +msgstr "" +"Uma ponte funciona examinando os endereços do nível MAC " +"(endereços Ethernet) dos dispositivos conectados a cada uma de suas " +"interfaces de rede e encaminhando o tráfego entre as duas redes apenas se a " +"origem e o destino estiverem em diferentes segmentos. Sob muitos pontos de " +"vista, uma ponte é semelhante a um switch Ethernet com apenas duas portas." + +#. (itstool) path: sect1/title +#: article.translate.xml:51 +msgid "Why use a filtering bridge?" +msgstr "Por que usar uma ponte de filtragem?" + +#. (itstool) path: sect1/para +#: article.translate.xml:53 +msgid "" +"More and more frequently, thanks to the lowering costs of broad band " +"Internet connections (xDSL) and also because of the reduction of available " +"IPv4 addresses, many companies are connected to the Internet 24 hours on 24 " +"and with few (sometimes not even a power of 2) IP addresses. In these " +"situations it is often desirable to have a firewall that filters incoming " +"and outgoing traffic from and towards Internet, but a packet filtering " +"solution based on router may not be applicable, either due to subnetting " +"issues, the router is owned by the connectivity supplier (ISP), or because it does not support such functionalities. In these " +"scenarios the use of a filtering bridge is highly advised." +msgstr "" +"Cada vez mais frequentemente, graças aos custos reduzidos de conexões de " +"banda larga à Internet (xDSL) e também devido à redução de endereços IPv4 " +"disponíveis, muitas empresas estão conectadas à Internet 24 horas por dia e " +"com poucos (às vezes nem mesmo 2) endereços IP. Nestas situações, geralmente " +"é desejável ter um firewall que filtre o tráfego de entrada e de saída de e " +"para a Internet, mas uma solução de filtragem de pacotes baseada em roteador " +"pode não ser aplicável, quer seja devido a problemas de sub-redes, quer seja " +"porque o roteador é de propriedade do provedor de conectividade " +"(ISP), ou porque ele não suporta tais funcionalidades. " +"Nestes cenários, o uso de uma ponte de filtragem é altamente recomendado." + +#. (itstool) path: sect1/para +#: article.translate.xml:65 +msgid "" +"A bridge-based firewall can be configured and inserted between the xDSL " +"router and your Ethernet hub/switch without any IP numbering issues." +msgstr "" +"Um firewall baseado em uma ponte de filtragem pode ser configurado e " +"inserido entre o roteador xDSL e seu hub/switch Ethernet sem causar nenhum " +"problema de numeração IP." + +#. (itstool) path: sect1/title +#: article.translate.xml:71 +msgid "How to Install" +msgstr "Como instalar" + +#. (itstool) path: sect1/para +#: article.translate.xml:73 +msgid "" +"Adding bridge functionalities to a FreeBSD system is not difficult. Since " +"4.5 release it is possible to load such functionalities as modules instead " +"of having to rebuild the kernel, simplifying the procedure a great deal. In " +"the following subsections I will explain both installation ways." +msgstr "" +"Adicionar funcionalidades de bridge a um sistema FreeBSD não é difícil. " +"Desde a versão 4.5 é possível carregar tais funcionalidades como módulos ao " +"invés de ter que reconstruir o kernel, simplificando bastante o " +"procedimento. Nas subseções seguintes, explicarei as duas formas de " +"instalação." + +#. (itstool) path: important/para +#: article.translate.xml:80 +msgid "" +"Do not follow both instructions: a procedure " +"excludes the other one. Select the best choice " +"according to your needs and abilities." +msgstr "" +"Não siga as duas instruções: um procedimento " +"exclui o outro. Selecione a melhor opção de acordo com " +"suas necessidades e habilidades." + +#. (itstool) path: sect1/para +#: article.translate.xml:85 +msgid "" +"Before going on, be sure to have at least two Ethernet cards that support " +"the promiscuous mode for both reception and transmission, since they must be " +"able to send Ethernet packets with any address, not just their own. " +"Moreover, to have a good throughput, the cards should be PCI bus mastering " +"cards. The best choices are still the Intel EtherExpress Pro, followed by the 3Com 3c9xx series. To simplify the firewall configuration it may be " +"useful to have two cards of different manufacturers (using different " +"drivers) in order to distinguish clearly which interface is connected to the " +"router and which to the inner network." +msgstr "" +"Antes de continuar, certifique-se de ter pelo menos duas placas Ethernet " +"compatíveis com o modo promíscuo para recepção e transmissão, pois elas " +"devem ser capazes de enviar pacotes Ethernet com qualquer endereço, não " +"apenas o deles. Além disso, para ter uma boa taxa de transferência, as " +"placas devem ser placas do barramento PCI. As melhores opções ainda são as " +"Intel EtherExpress Pro, seguido pela série 3Com 3c9xx. Para simplificar a configuração " +"do firewall, pode ser útil ter duas placas de diferentes fabricantes " +"(usando drivers diferentes) para distinguir claramente qual interface está " +"conectada ao roteador e qual está conectada à rede interna." + +#. (itstool) path: sect2/title +#: article.translate.xml:97 +msgid "Kernel Configuration" +msgstr "Configuração do Kernel" + +#. (itstool) path: sect2/para +#: article.translate.xml:99 +msgid "" +"So you have decided to use the older but well tested installation method. To " +"begin, you have to add the following rows to your kernel configuration file:" +msgstr "" +"Então você decidiu usar o método de instalação mais antigo, e também o mais " +"bem testado. Para começar, você precisa adicionar as seguintes linhas ao seu " +"arquivo de configuração do kernel:" + +#. (itstool) path: sect2/programlisting +#: article.translate.xml:103 +#, no-wrap +msgid "" +"options BRIDGE\n" +"options IPFIREWALL\n" +"options IPFIREWALL_VERBOSE" +msgstr "" +"options BRIDGE\n" +"options IPFIREWALL\n" +"options IPFIREWALL_VERBOSE" + +#. (itstool) path: sect2/para +#: article.translate.xml:107 +msgid "" +"The first line is to compile the bridge support, the second one is the " +"firewall and the third one is the logging functions of the firewall." +msgstr "" +"A primeira linha adiciona o suporte para o serviço de ponte (bridge), a " +"segunda adiciona o suporte ao firewall e a terceira é referente as funções " +"de registro do firewall." + +#. (itstool) path: sect2/para +#: article.translate.xml:111 +msgid "" +"Now it is necessary to build and install the new kernel. You may find " +"detailed instructions in the Building and " +"Installing a Custom Kernel section of the FreeBSD Handbook." +msgstr "" +"Agora é necessário compilar e instalar o novo kernel. Você pode encontrar " +"instruções detalhadas na seção Compilando e " +"Instalando um Kernel Personalizado do Handbook do FreeBSD." + +#. (itstool) path: sect2/title +#: article.translate.xml:118 +msgid "Modules Loading" +msgstr "Carregamento de módulos" + +#. (itstool) path: sect2/para +#: article.translate.xml:120 +msgid "" +"If you have chosen to use the new and simpler installation method, the only " +"thing to do now is add the following row to /boot/loader.conf:" +msgstr "" +"Se você escolheu usar o método de instalação mais novo e mais simples, a " +"única coisa a fazer agora é adicionar a seguinte linha ao /boot/" +"loader.conf:" + +#. (itstool) path: sect2/programlisting +#: article.translate.xml:124 +#, no-wrap +msgid "bridge_load=\"YES\"" +msgstr "bridge_load=\"YES\"" + +#. (itstool) path: sect2/para +#: article.translate.xml:126 +msgid "" +"In this way, during the system startup, the bridge.ko " +"module will be loaded together with the kernel. It is not required to add a " +"similar row for the ipfw.ko module, since it will be " +"loaded automatically after the execution of the steps in the following " +"section." +msgstr "" +"Desta forma, durante a inicialização do sistema, o módulo bridge." +"ko será carregado junto com o kernel. Não é necessário adicionar " +"uma linha semelhante para o módulo ipfw.ko, pois ele " +"será carregado automaticamente após a execução das etapas na seção a seguir." + +#. (itstool) path: sect1/title +#: article.translate.xml:136 +msgid "Final Preparation" +msgstr "Preparação final" + +#. (itstool) path: sect1/para +#: article.translate.xml:138 +msgid "" +"Before rebooting in order to load the new kernel or the required modules " +"(according to the previously chosen installation method), you have to make " +"some changes to the /etc/rc.conf configuration file. " +"The default rule of the firewall is to reject all IP packets. Initially we " +"will set up an firewall, in order to verify its " +"operation without any issue related to packet filtering (in case you are " +"going to execute this procedure remotely, such configuration will avoid you " +"to remain isolated from the network). Put these lines in /etc/rc." +"conf:" +msgstr "" +"Antes de reinicializar para carregar o novo kernel ou os módulos requeridos " +"(de acordo com o método de instalação escolhido anteriormente), você deve " +"fazer algumas alterações no arquivo de configuração /etc/rc.conf. A regra padrão do firewall é rejeitar todos os pacotes IP. " +"Inicialmente vamos configurar um firewall (aberto), a " +"fim de verificar sua operação sem qualquer problema relacionado à filtragem " +"de pacotes (no caso de você executar este procedimento remotamente, tal " +"configuração evitará que você permaneça isolado da rede). Coloque estas " +"linhas no /etc/rc.conf:" + +#. (itstool) path: sect1/programlisting +#: article.translate.xml:148 +#, no-wrap +msgid "" +"firewall_enable=\"YES\"\n" +"firewall_type=\"open\"\n" +"firewall_quiet=\"YES\"\n" +"firewall_logging=\"YES\"" +msgstr "" +"firewall_enable=\"YES\"\n" +"firewall_type=\"open\"\n" +"firewall_quiet=\"YES\"\n" +"firewall_logging=\"YES\"" + +#. (itstool) path: sect1/para +#: article.translate.xml:153 +msgid "" +"The first row will enable the firewall (and will load the module " +"ipfw.ko if it is not compiled in the kernel), the " +"second one to set up it in mode (as explained in " +"/etc/rc.firewall), the third one to not show rules " +"loading and the fourth one to enable logging support." +msgstr "" +"A primeira linha ativará o firewall (e carregará o módulo ipfw.ko se ele não estiver compilado no kernel), a segunda irá configurá-" +"lo no modo (como explicado em /etc/rc." +"firewall), a terceira para não mostrar o carregamento de regras e " +"a quarta para ativar o suporte aos logs." + +#. (itstool) path: sect1/para +#: article.translate.xml:159 +msgid "" +"About the configuration of the network interfaces, the most used way is to " +"assign an IP to only one of the network cards, but the bridge will work " +"equally even if both interfaces or none has a configured IP. In the last " +"case (IP-less) the bridge machine will be still more hidden, as inaccessible " +"from the network: to configure it, you have to login from console or through " +"a third network interface separated from the bridge. Sometimes, during the " +"system startup, some programs require network access, say for domain " +"resolution: in this case it is necessary to assign an IP to the external " +"interface (the one connected to Internet, where DNS " +"server resides), since the bridge will be activated at the end of the " +"startup procedure. It means that the fxp0 interface (in " +"our case) must be mentioned in the ifconfig section of the /etc/rc." +"conf file, while the xl0 is not. Assigning " +"an IP to both the network cards does not make much sense, unless, during the " +"start procedure, applications should access to services on both Ethernet " +"segments." +msgstr "" +"Sobre a configuração das interfaces de rede, a maneira mais usada é atribuir " +"um IP a apenas uma das placas de rede, mas a ponte funcionará igualmente, " +"mesmo que ambas as interfaces ou nenhuma tenha um IP configurado. No último " +"caso (IP-less) a máquina bridge ficará ainda mais oculta, e também " +"inacessível pela rede: para configurá-la será necessário efetuar o login a " +"partir do console ou através de uma terceira interface de rede separada da " +"ponte. Às vezes, durante a inicialização do sistema, alguns programas exigem " +"acesso à rede, digamos, para resolução de nomes de domínio: neste caso, é " +"necessário atribuir um IP à interface externa (aquela conectada à Internet, " +"onde o servidor DNS se encontra), uma vez que a ponte " +"será ativada no final do procedimento de inicialização. Isso significa que a " +"interface fxp0 (no nosso caso) deve ser mencionada na " +"seção ifconfig do arquivo /etc/rc.conf, enquanto o " +"xl0 não é. Atribuir um IP a ambas as placas de rede não " +"faz muito sentido, a menos que, durante o procedimento de inicialização, os " +"aplicativos acessem os serviços em ambos os segmentos de Ethernet." + +#. (itstool) path: sect1/para +#: article.translate.xml:177 +msgid "" +"There is another important thing to know. When running IP over Ethernet, " +"there are actually two Ethernet protocols in use: one is IP, the other is " +"ARP. ARP does the conversion of the IP " +"address of a host into its Ethernet address (MAC layer). " +"In order to allow the communication between two hosts separated by the " +"bridge, it is necessary that the bridge will forward ARP " +"packets. Such protocol is not included in the IP layer, since it exists only " +"with IP over Ethernet. The FreeBSD firewall filters exclusively on the IP " +"layer and therefore all non-IP packets (ARP included) " +"will be forwarded without being filtered, even if the firewall is configured " +"to not permit anything." +msgstr "" +"Há outra coisa importante a saber. Ao executar o IP sobre Ethernet, existem " +"dois protocolos Ethernet em uso: um é o IP, o outro é o ARP. O ARP faz a conversão do endereço IP de um host " +"em seu endereço Ethernet (camada MAC). Para permitir a " +"comunicação entre dois hosts separados pela ponte, é necessário que a ponte " +"envie pacotes ARP. Esse protocolo não está incluído na " +"camada IP, uma vez que ele existe apenas com IP sobre Ethernet. O firewall " +"do FreeBSD filtra exclusivamente na camada IP e, portanto, todos os pacotes " +"não-IP (ARP incluso) serão encaminhados sem serem " +"filtrados, mesmo que o firewall esteja configurado para não permitir nada." + +#. (itstool) path: sect1/para +#: article.translate.xml:190 +msgid "" +"Now it is time to reboot the system and use it as before: there will be some " +"new messages about the bridge and the firewall, but the bridge will not be " +"activated and the firewall, being in mode, will not " +"avoid any operations." +msgstr "" +"Agora é hora de reiniciar o sistema e usá-lo como antes: haverá algumas " +"novas mensagens sobre a ponte e o firewall, mas a ponte não será ativada e o " +"firewall, estando no modo , não evitará operações." + +#. (itstool) path: sect1/para +#: article.translate.xml:195 +msgid "" +"If there are any problems, you should sort them out now before proceeding." +msgstr "" +"Se houver algum problema, você deve resolvê-los agora antes de prosseguir." + +#. (itstool) path: sect1/title +#: article.translate.xml:200 +msgid "Enabling the Bridge" +msgstr "Habilitando a ponte" + +#. (itstool) path: sect1/para +#: article.translate.xml:202 +msgid "" +"At this point, to enable the bridge, you have to execute the following " +"commands (having the shrewdness to replace the names of the two network " +"interfaces fxp0 and xl0 with your " +"own ones):" +msgstr "" +"Neste ponto, para habilitar a ponte, você tem que executar os seguintes " +"comandos (tendo a perspicácia para substituir os nomes das duas interfaces " +"de rede fxp0 e xl0 com as suas " +"próprias):" + +#. (itstool) path: sect1/screen +#: article.translate.xml:207 +#, no-wrap +msgid "" +"# sysctl net.link.ether.bridge.config=fxp0:0,xl0:0\n" +"# sysctl net.link.ether.bridge.ipfw=1\n" +"# sysctl net.link.ether.bridge.enable=1" +msgstr "" +"# sysctl net.link.ether.bridge.config=fxp0:0,xl0:0\n" +"# sysctl net.link.ether.bridge.ipfw=1\n" +"# sysctl net.link.ether.bridge.enable=1" + +#. (itstool) path: sect1/para +#: article.translate.xml:211 +msgid "" +"The first row specifies which interfaces should be activated by the bridge, " +"the second one will enable the firewall on the bridge and finally the third " +"one will enable the bridge." +msgstr "" +"A primeira linha especifica quais interfaces devem ser ativadas pela ponte, " +"a segunda habilitará o firewall na ponte e, finalmente, a terceira " +"habilitará a ponte." + +#. (itstool) path: note/para +#: article.translate.xml:216 +msgid "" +"If you have FreeBSD 5.1-RELEASE or previous the sysctl variables are spelled " +"differently. See bridge4 for details." +msgstr "" +"Se você tem o FreeBSD 5.1-RELEASE ou anterior, as variáveis do sysctl são " +"escritas de forma diferente. Veja bridge4 para detalhes." + +#. (itstool) path: sect1/para +#: article.translate.xml:220 +msgid "" +"At this point you should be able to insert the machine between two sets of " +"hosts without compromising any communication abilities between them. If so, " +"the next step is to add the net.link.ether.bridge." +"[blah]=[blah] portions of these rows to the /etc/sysctl.conf " +"file, in order to have them execute at startup." +msgstr "" +"Neste ponto você deve ser capaz de inserir a máquina entre dois conjuntos de " +"hosts sem comprometer quaisquer habilidades de comunicação entre eles. Em " +"caso afirmativo, o próximo passo é adicionar as partes net.link." +"ether.bridge.[blah]=[blah] dessas linhas ao arquivo /etc/sysctl.conf, para que eles sejam executados na inicialização." + +#. (itstool) path: sect1/title +#: article.translate.xml:229 +msgid "Configuring The Firewall" +msgstr "Configurando o Firewall" + +#. (itstool) path: sect1/para +#: article.translate.xml:231 +msgid "" +"Now it is time to create your own file with custom firewall rules, in order " +"to secure the inside network. There will be some complication in doing this " +"because not all of the firewall functionalities are available on bridged " +"packets. Furthermore, there is a difference between the packets that are in " +"the process of being forwarded and packets that are being received by the " +"local machine. In general, incoming packets are run through the firewall " +"only once, not twice as is normally the case; in fact they are filtered only " +"upon receipt, so rules that use or which is " +"an older syntax, but one that has a sense when you read it. Another " +"limitation is that you are restricted to use only or " +" commands for packets filtered by a bridge. " +"Sophisticated things like , " +"or are not available. Such options can still be " +"used, but only on traffic to or from the bridge machine itself (if it has an " +"IP address)." +msgstr "" +"Agora é hora de criar seu próprio arquivo com regras de firewall " +"personalizadas, a fim de proteger a rede interna. Haverá alguma complicação " +"em fazer isso porque nem todas as funcionalidades do firewall estão " +"disponíveis em pacotes em ponte. Além disso, há uma diferença entre os " +"pacotes que estão sendo encaminhados e os pacotes que estão sendo recebidos " +"pela máquina local. Em geral, os pacotes de entrada passam pelo firewall " +"apenas uma vez, não duas vezes, como é normalmente o caso; na verdade eles " +"são filtrados somente após o recebimento, portanto, as regras que usam " +" ou nunca darão match. " +"Pessoalmente, eu uso que é uma sintaxe antiga, mas " +"uma que tem sentido quando você a lê. Outra limitação é que você está " +"restrito a usar somente comandos ou , ou " +"não estão disponíveis. Essas opções ainda podem ser usadas, mas apenas no " +"tráfego para ou a partir da própria máquina ponte (se ela tiver um endereço " +"IP)." + +#. (itstool) path: sect1/para +#: article.translate.xml:247 +msgid "" +"New in FreeBSD 4.0, is the concept of stateful filtering. This is a big " +"improvement for UDP traffic, which typically is a request " +"going out, followed shortly thereafter by a response with the exact same set " +"of IP addresses and port numbers (but with source and destination reversed, " +"of course). For firewalls that have no statekeeping, there is almost no way " +"to deal with this sort of traffic as a single session. But with a firewall " +"that can remember an outgoing UDP packet " +"and, for the next few minutes, allow a response, handling UDP services is trivial. The following example shows how to do it. It " +"is possible to do the same thing with TCP packets. This " +"allows you to avoid some denial of service attacks and other nasty tricks, " +"but it also typically makes your state table grow quickly in size." +msgstr "" +"O conceito de filtragem stateful é novo no FreeBSD 4.0. Esta é uma grande " +"melhoria para o tráfego UDP, que normalmente é um pedido " +"que sai, seguido pouco depois por uma resposta com exatamente o mesmo " +"conjunto de endereços IP e números de porta (mas com origem e destino " +"invertidos, é claro). Para firewalls que não possuem manutenção de estado, " +"quase não há como lidar com esse tipo de tráfego como uma sessão única. Mas " +"com um firewall que pode lembrar de um pacote UDP de saída e, nos próximos minutos, permitir uma resposta, o manuseio " +"de serviços UDP é trivial. O exemplo a seguir mostra como " +"fazer isso. É possível fazer a mesma coisa com pacotes TCP. Isso permite que você evite alguns ataques de negação de serviço e " +"outros truques desagradáveis, mas também faz com que sua tabela de estado " +"cresça rapidamente em tamanho." + +#. (itstool) path: sect1/para +#: article.translate.xml:261 +msgid "" +"Let's look at an example setup. Note first that at the top of /etc/" +"rc.firewall there are already standard rules for the loopback " +"interface lo0, so we should not have to care for them " +"anymore. Custom rules should be put in a separate file (say /etc/" +"rc.firewall.local) and loaded at system startup, by modifying the " +"row of /etc/rc.conf where we defined the