清风笑 发表于 2023-8-10 00:00:59

fail2ban的配置文件增加白名单有个细节

在jail.local配置文件中设置白名单ip的时,因为要设置的ip和ip段太多了
ignoreip = 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24 123.456.789/24
这样也太长也不好维护

有别的写法分开吗?换行自己试过了,无法重启fail2ban了



licess 发表于 2023-8-11 08:06:00

没有其他办法,只能这样写
要不就弄一个跳板机专门来访问ssh,只加跳板的ip或者直接iptables只允许跳板机的ip访问ssh
页: [1]
查看完整版本: fail2ban的配置文件增加白名单有个细节