Считайте это так, если у вас есть разрешения по умолчанию 666 означает, что у вас есть только r+w
для пользователя, группы и других, а по umask 541
вы хотите удалить разрешения r+x,r,x.
Для пользователя:
By default you can read+write and by umask you want to remove read+executable
permissions, but it will never happen because initially file has no executable
permissions. So only read permission will be removed.
Для группы:
read permission will removed
Для других:
There is no executable permission in the file, so there will be no change.
Та же концепция применяется к каталогам.
Обычно fail2ban не реагирует на такие атаки, чтобы заставить fail2ban реагировать на них, вам нужно установить агрессивный режим в вашей тюрьме в /etc/fail2ban/jail.local
вот так:
[sshd]
# To use more aggressive sshd modes set filter parameter "mode" in jail.local:
# normal (default), ddos, extra or aggressive (combines all).
# See "tests/files/logs/sshd" or "filter.d/sshd.conf" for usage example and details.
enabled = true
mode = aggressive
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
для большей защиты вы можете заблокировать постоянных злоумышленников с помощью повторной тюрьмы, подобной этой:
[recidive]
enabled = true
logpath = /var/log/fail2ban.log
banaction = %(banaction_allports)s
bantime = 1y
findtime = 1d
maxretry = 2
Ссылки: