【conoha VPS AlmaLinux9構築④】セキュリティ設定 その2 | 文系の麺ジニア
Linuxサーバーのセキュリティについて説明 | はじめのiT
fail2banの設定をした – DreamerDreamのブログ
How to Install Fail2Ban with Firewalld on Rocky Linux 10 | Atlantic.Net
何もしなくても最近はインストール時に以下のファイルでfirewalld使用にオーバーライドされているっぽい。
/etc/fail2ban/jail.d/00-firewalld.conf
fail2banでブルートフォース攻撃からsshdを守る | せろとにんぱわー.
□fail2ban でうざいアクセスをシャットアウト -2- | Linux Install Memo
と思ったが、.localに変えてあげないと読み込まない?
How to Install Fail2Ban with Firewalld on Rocky Linux 10 | Atlantic.Net
Step 3 – Configure Fail2Ban
By default, Fail2Ban is configured to use the iptables firewall, so you will need to configure Fail2Ban to work with Firewalld.
First, rename the Firewalld configuration file for Fail2Ban using the following command:
mv /etc/fail2ban/jail.d/00-firewalld.conf /etc/fail2ban/jail.d/00-firewalld.localNext, copy the Fail2Ban default configuration file:
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.localNext, edit the jail.local file:
nano /etc/fail2ban/jail.localFind the following lines:
banaction = iptables-multiport banaction_allports = iptables-allportsAnd replace them with the following lines:
banaction = firewallcmd-rich-rules[actiontype=] banaction_allports = firewallcmd-rich-rules[actiontype=]Save and close the file, then restart the Fail2Ban to apply the changes:
systemctl restart fail2banAt this point, Fail2Ban is configured to work with Firewalld.
