<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[刘新修]]></title> 
<link>http://pic1.liuxinxiu.com:80/index.php</link> 
<description><![CDATA[刘新修的个人博客 (Liuxinxiu'S Blog)]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[刘新修]]></copyright>
<item>
<link>http://pic1.liuxinxiu.com:80/s//</link>
<title><![CDATA[查看最近已登录的是连接到服务器的最大数量的IP的列表]]></title> 
<author>刘新修 &lt;admin@yourname.com&gt;</author>
<category><![CDATA[Linux/Unix]]></category>
<pubDate>Mon, 31 Aug 2020 08:58:03 +0000</pubDate> 
<guid>http://pic1.liuxinxiu.com:80/s//</guid> 
<description>
<![CDATA[ 
	<p><strong>如何确认是否受到DDOS攻击?</strong></p><p>登录到你的服务器以root用户执行下面的命令，使用它你可以检查你的服务器是在DDOS攻击与否：</p><div class="codeText"><div class="codeHead">C#代码</div><ol start="1" class="dp-c"><li class="alt"><span><span>netstat -ntu &#124; awk </span><span class="string">'&#123;print $5&#125;'</span><span> &#124; cut -d: -f1 &#124; sort &#124; uniq -c &#124; sort -n&nbsp;&nbsp;</span></span></li></ol></div><p>执行后，将会显示服务器上所有的每个IP多少个连接数。每个IP几个、十几个或几十个连接数都还算比较正常，如果像上面成百上千肯定就不正常了，<span style="color: rgb(255, 0, 0);"><span style="font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 16px;">该命令将显示已登录的是连接到服务器的最大数量的IP的列表</span></span><span style="color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 16px;">。</span></p><p><span style="color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 16px;">另外还有其他情况，使DDOS变得更为复杂，因为攻击者在使用更少的连接，更多数量IP的攻击服务器的情况下，你得到的连接数量较少，即使你的服务器被攻击了。有一点很重要，你应该检查当前你的服务器活跃的连接信息，执行以下命令：</span></p><div class="codeText"><div class="codeHead">C#代码</div><ol start="1" class="dp-c"><li class="alt"><span><span>netstat&nbsp;-n&nbsp;&#124;&nbsp;grep&nbsp;:80&nbsp;&#124;wc&nbsp;&ndash;l&nbsp;&nbsp;</span></span></li></ol></div><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-word; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 16px;">上面的命令将显示所有打开你的服务器的活跃连接。</p><p>&nbsp;</p><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-word; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 16px;">您也可以使用如下命令：</p><div class="codeText"><div class="codeHead">C#代码</div><ol start="1" class="dp-c"><li class="alt"><span><span>netstat&nbsp;-n&nbsp;&#124;&nbsp;grep&nbsp;:80&nbsp;&#124;&nbsp;grep&nbsp;SYN&nbsp;&#124;wc&nbsp;&ndash;l&nbsp;&nbsp;</span></span></li></ol></div><div><div><p>从第一个命令有效连接的结果会有所不同，但如果它显示连接超过500，那么将肯定有问题。</p><p>如果第二个命令的结果是100或以上，那么服务器可能被同步攻击。</p><p>一旦你获得了攻击你的服务器的IP列表，你可以很容易地阻止它。</p></div></div>
]]>
</description>
</item><item>
<link>http://pic1.liuxinxiu.com:80/s//#blogcomment</link>
<title><![CDATA[[评论] 查看最近已登录的是连接到服务器的最大数量的IP的列表]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://pic1.liuxinxiu.com:80/s//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>