
Code: Select all
iptables -A SSHD -p tcp -m state --state NEW -m recent --update --seconds 86400 --hitcount 3 --rttl -j DROPLOG
iptables -A SSHD -p tcp -m state --state NEW -m recent --set -j ACCEPT
iptables -A DROPLOG -m limit --limit 3/minute --limit-burst 10 -j LOG --log-prefix 'iptables Droplog: '
iptables -A DROPLOG -j DROP
Code: Select all
emerge app-admin/denyhosts

this can't solve the problem.kamagurka wrote:I found that using a really strange portnumber for ssh works fine. If that fails, a big cardboard "no bots alowed here" sign on the workstation does wonders, too =D

I don't know how you do it, but I just forwarded the port. Or do you mean when you're behind a firewall that you don't control?k.gothmog wrote:this is true... but in this manner you can connect to your SSH server if you are over a firewall that (correctly) opens just port 22 and not otherskamagurka wrote:You are, of course, right. But doesn't choosing a very high non-standard portnumber protect you from portscans?

Yes and No. This will protect you from most script kiddie tools, however, those tools generally only scan standard ports. Sadly, most of the bot / zombie nets are using tools vastly superior to what script kiddies use, tools that specifically scan ports in the 56K - 64K range specifically to look for these types of openings. That's actually the reason I have given up on hiding ports, and instead have opted to simply use abuse blockers, like the IP tables piece I did above.kamagurka wrote:You are, of course, right. But doesn't choosing a very high non-standard portnumber protect you from portscans?