[AsteriskBrasil] RES: Ataque

Eduardo Pereira edupbar em gmail.com
Sábado Dezembro 11 11:59:13 BRST 2010


Wagner

utilizando o arquivo do proprio centos seria assim?

# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p xxx -j ACCEPT
-A RH-Firewall-1-INPUT -p xxx -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport xxxx -d xxxxxxxxx -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport xxxx -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport xxxx -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5060 -i eth0 -m state --state NEW 
-m recent --set
-A RH-Firewall-1-INPUT -p tcp --dport 5060 -i eth0 -m state --state NEW 
-m recent --update --seconds 60 --hitcount 4 -j DROP
#-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5060 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 4569 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5036 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 
10000:20000 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport xxxxxx 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport xxxxx 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport xxxxx 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport xxxxx 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport xxxxx 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport xxxxx 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport xxxxx 
-j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport xxxxx 
-j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT

Att

Eduardo

Em 11-12-2010 10:34, Wagner Popov dos Santos escreveu:
> Eduardo,
>
> Segue um pequeno texto sobre previnir DoS utilizando o iptables. Você
> pode limitar o número de conexões de uma mesma fonte durante um
> determinado período. Você pode ainda proteger outros serviços...
>
> ps: não cheguei a testar!
>
> <<  Prevent DoS attack in Linux using IPTABLES>>
>
> A major problem facing by mail server admin is DOS (Deniel Of Service)
> attack. Hackers will try to mess up with the most popular ports of a
> UNIX/LINUX machines. We can prevent this my writing an IPTABLE rule in
> the server. The working is ,if some one is trying make connection
> continuously through a specified port the rule will block the IPADDRESS
> permanently. Here I am stating the securing of PORT 25 (SMTP) here you
> can use your own
>
> iptables -I INPUT -p tcp --dport 25 -i eth0 -m state --state NEW -m
> recent --set
>
> iptables -I INPUT -p tcp --dport 25 -i eth0 -m state --state NEW -m
> recent --update --seconds 60 --hitcount 4 -j DROP
>
> This will Block all the IP ADDRESS which will make connection to port 25
> continuously within ie 4 SMTP connection within 60 seconds. You can
> change PORT,INTERVALs here.
>
>
>
>
>
>
>
>
>
> Em Sáb, 2010-12-11 às 10:10 -0200, Rodrigo Lang escreveu:
>>          Em 11/12/2010, às 10:54, Fernando Meira Lins escreveu:
>>
>>          >  Também fui atacado por este IP e o fail2ban, demorou 132
>>          tentativas
>>          >  para bloquear. Muito estranho... Assim que recebi o alerta,
>>          de
>>          >  imediato bloqueei pelo IPTABLES, mas de fato o que intriga,
>>          é porque
>>          >  o fail2ban deixou passar tantas tentativas além do
>>          estipulado?
>>          >
>>
>>
>>
>> Pelo que eu saiba (posso estar errado) o fail2ban bloqueia após 3
>> tentativas no mesmo ramal.
>>
>>
>>
>> At,
>> -- 
>> Rodrigo Lang
>> Opening your mind - Just another Open Source site
>>
>> _______________________________________________
>> KHOMP: qualidade em placas de E1, GSM, FXS e FXO para Asterisk.
>> - Hardware com alta disponibilidade de recursos e qualidade KHOMP
>> - Suporte técnico local qualificado e gratuito
>> Conheça a linha completa de produtos KHOMP em www.khomp.com.br
>> _______________________________________________
>> Headsets Plantronics com o melhor preço do Brasil.
>> Acesse agora www.voipmania.com.br
>> VOIPMANIA STORE
>> ________
>> Lista de discussões AsteriskBrasil.org
>> AsteriskBrasil em listas.asteriskbrasil.org
>> http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil
>> ______________________________________________
>> Para remover seu email desta lista, basta enviar um email em branco para asteriskbrasil-unsubscribe em listas.asteriskbrasil.org
>
> _______________________________________________
> KHOMP: qualidade em placas de E1, GSM, FXS e FXO para Asterisk.
> - Hardware com alta disponibilidade de recursos e qualidade KHOMP
> - Suporte técnico local qualificado e gratuito
> Conheça a linha completa de produtos KHOMP em www.khomp.com.br
> _______________________________________________
> Headsets Plantronics com o melhor preço do Brasil.
> Acesse agora www.voipmania.com.br
> VOIPMANIA STORE
> ________
> Lista de discussões AsteriskBrasil.org
> AsteriskBrasil em listas.asteriskbrasil.org
> http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil
> ______________________________________________
> Para remover seu email desta lista, basta enviar um email em branco para asteriskbrasil-unsubscribe em listas.asteriskbrasil.org
>



Mais detalhes sobre a lista de discussão AsteriskBrasil