#author("2026-11-22T09:17:35+00:00","default:iseki","iseki")
#author("2026-11-22T09:18:03+00:00","default:iseki","iseki")
* fail2ban

** for SSH
*** Install
<pre>
dnf install fail2ban
systemctl enable --now fail2ban
</pre>
- dnf install fail2ban
- systemctl enable --now fail2ban


*** Setting 
**** /etc/fail2ban/jail.d/sshd.local
- 5回失敗で 24時間.最大 30日.
<pre>
[sshd]
enabled = true
backend = systemd
port = ssh
#banaction = nftables
banaction = nftables[blocktype=drop]

maxretry = 5
findtime = 600

bantime = 86400
bantime.increment = true
bantime.maxtime = 2592000
</pre>

*** 再起動
- fail2ban-client -t
- fail2ban-client reload

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS