Skip to content

LittleJake/fail2ban-server-chan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

fail2ban-server-chan

Fail2Ban连结server酱进行IP封禁提醒

使用方式

下载配置文件至fail2ban的action.d目录

cd /etc/fail2ban/action.d
sudo wget https://cdn.jsdelivr.net/gh/LittleJake/fail2ban-server-chan/server-chan.conf

编辑server-chan.conf,将sckey行修改为你的server酱SCKEY。

# Option:  server_chan_sckey
# Notes    Your sckey from sc.ftqq.com
# Values:  STRING  Default: None
# Register for abuseipdb [https://sc.ftqq.com/], get sckey and set below.
server_chan_sckey = 你的SCKEY

同时,在/etc/fail2ban/jail.local添加对应规则内action

# 单行action
action = server-chan

# 多个action
action = iptables[name=SSH, port=22, protocol=tcp]
         server-chan

最后,重新读取配置即可。

systemctl reload fail2ban

效果

demo

开源协议

Apache 2.0

About

Fail2Ban连结server酱进行IP封禁提醒配置文件

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published