This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SSH block password guessing not working

Hi,

I'm having issues setting up the SSH block password guessing feature properly.

In Definitions & Users -> Authentication Services -> Advanced -> Block password guessing I have set attempts to 3, block for 1800 secs, enabled drop packets and ticked SSH access in Facilities. The list of "Never block networks" is empty.

When I try false logins from another (non-local) remote server via SSH, I'm never getting blocked. I got 5 emails from UTM about a failed SSH login (5 is the limit), but I don't get the email stating that the IP has been blocked for 1800 seconds.

The SSH log shows that the device sees the failed logins:

2015:01:12-11:50:41 gw-2 sshd[19005]: Failed password for root from  port 38604 ssh2
2015:01:12-11:50:42 gw-2 sshd[19005]: Failed password for root from  port 38604 ssh2
2015:01:12-11:50:43 gw-2 sshd[19005]: Failed password for root from  port 38604 ssh2
2015:01:12-11:50:43 gw-2 sshd[19005]: Connection closed by  [preauth]
2015:01:12-11:50:45 gw-2 sshd[19047]: Failed password for root from  port 38605 ssh2
2015:01:12-11:50:46 gw-2 sshd[19047]: Failed password for root from  port 38605 ssh2
2015:01:12-11:50:47 gw-2 sshd[19047]: Failed password for root from  port 38605 ssh2
2015:01:12-11:50:47 gw-2 sshd[19047]: Connection closed by  [preauth]
2015:01:12-11:50:48 gw-2 sshd[19216]: Failed password for root from  port 38606 ssh2
2015:01:12-11:50:49 gw-2 sshd[19216]: Failed password for root from  port 38606 ssh2
2015:01:12-11:50:50 gw-2 sshd[19216]: Failed password for root from  port 38606 ssh2
2015:01:12-11:50:50 gw-2 sshd[19216]: Connection closed by  [preauth]
2015:01:12-11:50:52 gw-2 sshd[19253]: Failed password for root from  port 38607 ssh2
2015:01:12-11:50:52 gw-2 sshd[19253]: Failed password for root from  port 38607 ssh2
2015:01:12-11:50:53 gw-2 sshd[19253]: Failed password for root from  port 38607 ssh2
2015:01:12-11:50:53 gw-2 sshd[19253]: Connection closed by  [preauth]
2015:01:12-11:50:55 gw-2 sshd[19291]: Failed password for root from  port 38608 ssh2
2015:01:12-11:50:56 gw-2 sshd[19291]: Failed password for root from  port 38608 ssh2
2015:01:12-11:50:56 gw-2 sshd[19291]: Failed password for root from  port 38608 ssh2
2015:01:12-11:50:56 gw-2 sshd[19291]: Connection closed by  [preauth]


The weird thing is that from time to time I get emails about some IP being blocked. I just don't seem to be able to block myself...

Thanks for the help.
hubsif.


This thread was automatically locked due to age.
Parents
  • @Jayson: You're perfectly right about the suggested modifications. I had already moved SSH to a non-standard high port before and allow login with certificates only. But those bots out there seem to always find out sooner or later.
    And I think your suggestion to simply disable (non-VPN) SSH follows a wrong way of argumentation. It would surely increase security, but then you could also say shutting down the device would increase security [:)].

    Anyways, I need to be able to login from external sources without VPN, so simply turning that off is not applicable here. And that's why I was looking into the blocking feature.
    I'm not really worried about someone actually finding his way in, due to certificate logins only. But all these brute force attacks increase the load on the device, spam the log files and most importantly keep the hackers retrying. Since the device offers the ability to get rid of this, I'd like to use that feature.

    Unfortunately, I still wasn't able to get it working. I still get some emails that some China IP has been blocked, and I still am not able to block myself. I keep wondering in what way the blocked attempts are different from the ones that aren't blocked...

    @fulgan: I updated my devices to 9.3 yesterday. I was hoping that this might fix it, but it didn't. What you're saying sounds like it could even have become worse, so that even the random blocks won't work anymore.
    What makes you think that it's not working at all? And how do you know fail2ban is being used for that feature? I can't find any hints of fail2ban on the devices.

    hnu
  • Im with you hnu.

    My email got spammed with huge number of attempted logins. The pad part is, that these bots know their trying to login to a valid device, as their being blocked after number of attempts and then their allowed again after 600 seconds by default.

    I have no idea why such a simple option as blocking/blaclisting IPs is not implemented in the UTM.

    There is a feature request already for that:
    Network Security: Block Malicious/Botnet/Bad IP's using Blacklist "Service"

    But thats about it.

    Many much simpler, even desktop firewalls allow blacklisting...

    I even had a Synology NAS with built in firewall.
    I could setup blocking ips with # of failed login attempts permanently.

    I still will have access from internal network, so that shouldn't be a problem. 

    I am very disappointed Sophos/Astaro.
Reply
  • Im with you hnu.

    My email got spammed with huge number of attempted logins. The pad part is, that these bots know their trying to login to a valid device, as their being blocked after number of attempts and then their allowed again after 600 seconds by default.

    I have no idea why such a simple option as blocking/blaclisting IPs is not implemented in the UTM.

    There is a feature request already for that:
    Network Security: Block Malicious/Botnet/Bad IP's using Blacklist "Service"

    But thats about it.

    Many much simpler, even desktop firewalls allow blacklisting...

    I even had a Synology NAS with built in firewall.
    I could setup blocking ips with # of failed login attempts permanently.

    I still will have access from internal network, so that shouldn't be a problem. 

    I am very disappointed Sophos/Astaro.
Children
No Data