<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[linux暴力破解简单防范方法]]></title><description><![CDATA[<p dir="auto">1、安装fail2ban</p>
<pre><code>sudo apt-get install fail2ban
</code></pre>
<p dir="auto">2、修改配置</p>
<pre><code>vi /etc/fail2ban/jail.conf
</code></pre>
<p dir="auto">修改如下</p>
<pre><code>[ssh]
enabled = true
prot = 22
filter = sshd
logpath = /var/log/auth.log      
bantime = -1
maxretry = 5
</code></pre>
<p dir="auto">3、重启ssh</p>
<pre><code>sudo service ssh restart
</code></pre>
<p dir="auto">4、查看被封禁状态</p>
<pre><code>fail2ban-client status sshd  
</code></pre>
<p dir="auto"><a href="https://www.jianshu.com/p/1c57a3012b75" rel="nofollow ugc">原文链接</a></p>
<p dir="auto">注：不小心测试被封禁使用云机器直接登录执行：</p>
<pre><code>fail2ban-client set sshd unbanip 111.111.111.111
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/88/linux暴力破解简单防范方法</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 09:37:53 GMT</lastBuildDate><atom:link href="http://an.forum.genostack.com/topic/88.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 19 Sep 2020 04:08:11 GMT</pubDate><ttl>60</ttl></channel></rss>