Hacker News new | ask | show | jobs
by maratd 5220 days ago
Even better, just use iptables to drop any connection that is outside of a certain ip range or your static ip or your domain name. It will eliminate all of those attacks and port scanning won't help them. It doesn't mean someone can't get in, but it will eliminate the script kiddies.
1 comments

I have a script (easy when one embeds Lua inside syslogd) that checks for failed ssh logins and after a few failed attempts, blocks the address via iptables (and another script to remove such blocks after a few hours to keep iptables entries from piling up).
That's essentially what DenyHosts[1] and fail2ban[2] do, except they're more complex (the former has blacklist sharing, while the later supports more than ssh).

[1]: http://denyhosts.sourceforge.net/index.html

[2]: http://www.fail2ban.org/wiki/index.php/Main_Page