<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Em 25-08-2010 17:55, Alexandre Ricardo Souza Silva escreveu:
<blockquote
 cite="mid:20A2B02F95D645AB986272C7D9D8D15F@cmpz.componentizar.com.br"
 type="cite">
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <meta name="GENERATOR" content="MSHTML 8.00.6001.18812">
  <div><font size="2" face="Arial">Junior, entendi o seu exemplo abaixo,</font></div>
  <div><font size="2" face="Arial">Entao se eu liberar a porta por
exemplo&nbsp;7000 ele vai redirecionar para porta 4569, portanto no meu
firewall nao preciso liberar a porta 4569.?</font></div>
  <div><font size="2" face="Arial">A minha politica no Input e drop-All
, libero somente as porta que quero.</font></div>
  <div><font size="2" face="Arial">&eacute; isso mesmo?</font></div>
  <blockquote
 style="border-left: 2px solid rgb(0, 0, 0); padding-left: 5px; padding-right: 0px; margin-left: 5px; margin-right: 0px;">iptables
-t nat -A PREROUTING -p udp -m udp --dport 7000 -j REDIRECT --to-ports
4569<br>
  </blockquote>
</blockquote>
<br>
Ol&aacute;!<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; N&atilde;o, esse exemplo que eu dei vai fazer o direcionamento da
porta 7000 para a 4569 no Asterisk. Se tem um firewall na frente, ent&atilde;o
fa&ccedil;a o redirecionamento nele, por exemplo se o IP do Asterisk &eacute;
10.10.10.10, ent&atilde;o no firewall j&aacute; deve ter algo como:<br>
<br>
iptables -t nat -A PREROUTING -p udp -m udp --dport 4569 -j DNAT
--to-destination 10.10.10.10<br>
<br>
Ent&atilde;o mude para:<br>
<br>
iptables -t nat -A PREROUTING -p udp -m udp --dport 7000 -j DNAT
--to-destination 10.10.10.10:4569<br>
<br>
A&iacute; no Asterisk n&atilde;o precisa mudar nada se j&aacute; tiver tudo certo com a
porta 4569. A regra Input no firewall continua a mesma, pois este
pacote n&atilde;o vai entrar no firewall (input) e sim ser redirecionado para
o Asterisk. A regra Input no Asterisk obviamente deve ter liberadas as
portas SIP (5060) e IAX (4569), al&eacute;m das RTP (10000-20000 geralmente).<br>
<br>
[]'s<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Junior Polegato<br>
<br>
</body>
</html>