segunda-feira, 1 de outubro de 2012

IPtables



Exibindo Regras
iptables -L
   -L, --list [chain]
   -L, --lisa [cadeia]
              List  all rules in the selected chain.  If no chain is selected,
              Listar todas as regras na cadeia selecionada. Se nenhuma cadeia é selecionada.
              all chains are listed. Like every  other  iptables  command,  it
              todas as cadeias são listadas. Como cada comando iptables, outro
              applies  to  the specified table (filter is the default), so NAT
              aplica-se a tabela especificada (filtro é padrão), para NAT
              rules get listed by
              regras são listadas por            
               iptables -t nat -n -L
     iptables -t nat -n -L
              Please note that it is often used with the -n option,  in  order
              Por favor, note que é geralmente usado com a opção -n, a fim 
              to  avoid  long reverse DNS lookups.  It is legal to specify the
              para evitar longas consultas de DNS reverso. E legal para especificar a
              -Z (zero) option as well, in which case  the  chain(s)  will  be
             opção -Z (zero), bem como, caso em que a cadeia (s) será
              atomically  listed  and zeroed.  The exact output is affected by
              atomicamente listados e zerados. A saída exata é afetada por
              the other arguments given. The exact rules are suppressed  until
              os outros argumentos dados. A regras são suprimidas até
              you use
              voce usa  iptables -L -v

Libera uma porta
iptables -A FORWARD -p tcp --dport porta -j ACCEPT


http://eriberto.pro.br/iptables/3.html
http://www.vivaolinux.com.br/artigo/Desvendando-as-regras-de-Firewall-Linux-Iptables/?pagina=2
http://www.pedropereira.net/como-usar-o-tcpdump/