linux改端口后上不了网,linux – 更改ssh端口后的Fail2ban设置

我将我的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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值