Need help translating rate limiting iptables rules to Puppet format
- by geoffroy
I use Puppet Iptables module to manage Iptables rules on my machine.
I'd like to implement to rate limit failed SSH connections as described here :
Hundreds of failed ssh logins
iptables -A INPUT -p tcp --dport 22 -m recent --update --seconds 60 --hitcount 5 --name SSH --rsource -j DROP
iptables -A INPUT -p tcp --dport 22 -m recent --set --name SSH --rsource -j ACCEPT
Is it possible to translate it to Puppet syntax, such as
firewall { '015 drop 5 failed attemps to connect to SSH in a minute ':
proto => 'tcp',
port => 22,
action => 'drop',
// what are the other paramters ?
}
Any help welcome.
Best regards
Geoffroy