too many illegal connection attempts through ssh

Joshua Tinnin krinklyfig at spymac.com
Wed Apr 6 00:29:00 PDT 2005


On Wednesday 06 April 2005 00:15, "Edwin D. Vinas" <xmisoy at gmail.com> 
wrote:
> hello,
>
> shown below is snapshot of too many illegal attempts to login to my
> server from a suspicious hacker. this is taken from the
> "/var/log/auth.log". my question is, how do i automatically block an
> IP address if it is attempting to guess my login usernames?

The easiest way to fix this problem most of the time is just change the 
ssh port to something else, like a high numbered port that's otherwise 
unassigned.

> can i 
> configure the firewall to check the instances a certain IP has
> attempted to access/ssh the sevrer, and if it has failed to login for
> about "x" number of attempts, it will be blocked automatically?

Yes, the best way to deal with this is through the firewall rather than 
sshd, if you still get people hammering away at your ssh port even 
after you change it. What are you using? You might want to check in 
chapter 24 of the handbook ...

- jt


More information about the freebsd-questions mailing list