VPS侦探论坛

 找回密码
 注册
查看: 1085|回复: 1

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

[复制链接]
发表于 2023-8-10 00:00:59 | 显示全部楼层 |阅读模式

在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了



美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2023-8-11 08:06:00 | 显示全部楼层


没有其他办法,只能这样写
要不就弄一个跳板机专门来访问ssh,只加跳板的ip或者直接iptables只允许跳板机的ip访问ssh
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-21 19:59 , Processed in 0.026006 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表