- iptables + limite
+ Responder ao Tópico
-
iptables + limite
olá...
eu gostaria de receber apenas 1 ping por segundo, e testei essa regra:
iptables -A INPUT -p icmp -m limit --limit 1/s -j ACCEPT
ai eu testo assim:
[teste@localhost]# ping -f localhost
eu dexo uns 3 segundos, depois cancelo, e ele envia e recebe mais de 6 mil pacotes, oq eh mais de 1 por segundo.
Oq esta errado?
-
iptables + limite
naum lembro como eh q regra exatamente mas alem do limit vc tem q usar o limit burst... da uma olhada na documentação
-
iptables + limite
eu tentei com --limit-burst mas nao deu resultado
;/
-
iptables + limite
Eu não testei, mas achei isso em:
http://www.linuxjournal.com/article.php?sid=4815
At this point, I should mention that, unlike ipchains, a target match does not necessarily terminate a chain. For example, if you use the following rule in tcprules:
$IPT -t filter -I INPUT -p ICMP -m icmp --icmp-type echo-request
-m limit --limit 1/minute -j LOG --log-prefix "ICMP-packet "
the next rule (which may or may not also match this packet) will be processed. If a rule match does not drop, reject, accept or queue the packet and is not a return, the chain will continue.