我将我的ssh端口切换到22000并更改了/etc/fail2ban/jail.local中的端口设置以指定禁止22和22000但是当我尝试无法登录6次时,我的连接被切断但是能够尝试立即再次登录.
根据我设置的默认bantime,我的IP似乎没有被禁止一小时.
我如何配置这个有什么问题吗?
# "bantime" is the number of seconds that a host is banned.
bantime = 3600
[ssh]
enabled = true
port = ssh,22000
filter = sshd
logpath = /var/log/auth.log
maxretry = 6
谢谢.
编辑:
每个请求的Netstat输出.
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1061/master
tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN 940/mongod
tcp 0 0 0.0.0.0:22000 0.0.0.0:* LISTEN 1377/sshd
tcp 0 0 0.0.0.0:28017 0.0.0.0:* LISTEN 940/mongod
tcp 0 0 0.0.0.0:8787 0.0.0.0:* LISTEN 951/rserver
tcp6 0 0 :::25 :::* LISTEN 1061/master
tcp6 0 0 :::22000 :::* LISTEN 1377/sshd
最后
以上就是狂野红牛最近收集整理的关于linux改端口后上不了网,linux – 更改ssh端口后的Fail2ban设置的全部内容,更多相关linux改端口后上不了网,linux内容请搜索靠谱客的其他文章。
发表评论 取消回复