<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EstiloDeEmail17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=PT-BR link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Pergunta idiota... sem as regras do
iptables vc consegue acesso?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>De:</span></font></b><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'> centos-pt-br-bounces@centos.org
[mailto:centos-pt-br-bounces@centos.org] <st1:PersonName
ProductID="Em nome de Thiago Henrique" w:st="on"><b><span style='font-weight:
 bold'>Em nome de </span></b>Thiago Henrique</st1:PersonName><br>
<b><span style='font-weight:bold'>Enviada em:</span></b> quarta-feira, 2 de
março de 2011 17:24<br>
<b><span style='font-weight:bold'>Para:</span></b> centos-pt-br@centos.org<br>
<b><span style='font-weight:bold'>Assunto:</span></b> [CentOS-pt-br] Problemas
com iptables+SSH</span></font><font color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face=Tahoma><span style='font-size:
12.0pt;font-family:Tahoma'>Boa tarde a todos,<br>
<br>
Pessoal, mudei a porta do SSH para 3128, e depois criei algumas regras de
firewall liberando acesso a esta porta partindo somente do Brasil, como podem
ver na saída do</span></font> <font face=Courier><span style='font-family:Courier'>iptables
-n -L</span></font> <font face=Tahoma><span style='font-family:Tahoma'>abaixo:</span></font><br>
<font face="Courier New"><span style='font-family:"Courier New"'><br>
Chain INPUT (policy ACCEPT)<br>
target&nbsp;&nbsp;&nbsp;&nbsp; prot opt
source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
destination&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><br>
<font face="Courier New"><span style='font-family:"Courier New"'>ACCEPT&nbsp;&nbsp;&nbsp;&nbsp;
tcp&nbsp; --&nbsp; 177.0.0.0/11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp dpt:3128<br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; --&nbsp;
177.32.0.0/11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp dpt:3128<br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; --&nbsp;
186.192.0.0/11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp dpt:3128<br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; --&nbsp;
186.224.0.0/11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp dpt:3128<br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; --&nbsp;
187.0.0.0/11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp dpt:3128<br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; --&nb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; tcp dpt:3128<br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; --&nbsp;
201.16.0.0/12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp dpt:3128<br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; --&nbsp;
201.32.0.0/12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp dpt:3128<br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; --&nbsp;
201.48.0.0/12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp dpt:3128<br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; --&nbsp;
201.64.0.0/11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
tcp dpt:3128<br>
DROP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp; --&nbsp;
0.0.0.0/0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><br>
<br>
<font face=Tahoma><span style='font-family:Tahoma'>Meu problema:<br>
<br>
Após aplicar esta regra, eu não consigo abrir novas conexões com o SSH, pois
por algum motivo ele fecha a conexão:</span></font><br>
<br>
<font face="Courier New"><span style='font-family:"Courier New"'>$ telnet
x.x.x.x 3128<br>
Trying x.x.x.x...<br>
Connected to x.x.x.x.<br>
Escape character is '^]'.<br>
SSH-2.0-OpenSSH_4.3<br>
^C<br>
Connection closed by foreign host.<br>
$ ssh <a href="mailto:usuario@x.x.x.x">usuario@x.x.x.x</a> -p 3128<br>
Connection closed by x.x.x.x</span></font><br>
<br>
<font face=Tahoma><span style='font-family:Tahoma'>Antes que alguém pergunte,
se eu volto o SSH pra porta 22 e aplico as regras acima para ela, não resolve
nada, continua apresentando os mesmos problemas.<br>
<br>
Já pesquisei, mas, não acho nada que ajude. <br>
Alguém tem uma luz do que pode estar causando este problema?<br>
<br>
Atenciosamente,</span></font><o:p></o:p></p>

</div>

</div>

</body>

</html>