Skip to content

Instantly share code, notes, and snippets.

@ik11235
Created July 16, 2019 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ik11235/6ed487ab23510100b9155d39c7ce278a to your computer and use it in GitHub Desktop.
Save ik11235/6ed487ab23510100b9155d39c7ce278a to your computer and use it in GitHub Desktop.
yuichi@ik-fib-com-wordpresspro-1-vm:~$ cat /etc/fail2ban/jail.local
[DEFAULT]
#■基本設定
backend = auto
ignoreip = 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 ; 無視するIPアドレス(ホワイトリスト)
#■BAN設定
bantime = 360000 ; BANされたIPアドレスがアクセスを禁止される期間(秒)
findtime = 600 ; BANの判定時間(秒)
maxretry = 3 ; アクセス回数
#■メール設定
destemail = destemail@example.com ; アラートメールの送信先アドレス
sender = fail2ban@example.com ; メールの送信元
#■その他
action = %(action_mw)s ; BANされたIPアドレスのWHOIS情報をメール送信
[sshd]
enabled = true
port = ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment