<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bloody error &#187; netstat</title>
	<atom:link href="http://www.bloodyerror.com/tag/netstat/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloodyerror.com</link>
	<description>hope something here may help you...</description>
	<lastBuildDate>Thu, 14 Jan 2010 17:29:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unix shell command to Detect DDoS attack</title>
		<link>http://www.bloodyerror.com/2009/07/unix-shell-command-to-detect-ddos-attack/</link>
		<comments>http://www.bloodyerror.com/2009/07/unix-shell-command-to-detect-ddos-attack/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 16:38:24 +0000</pubDate>
		<dc:creator>Jeevan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[DDoS]]></category>
		<category><![CDATA[Detect DDoS]]></category>
		<category><![CDATA[Linux Command]]></category>
		<category><![CDATA[netstat]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[shell command]]></category>

		<guid isPermaLink="false">http://www.bloodyerror.com/?p=23</guid>
		<description><![CDATA[Have a server? Doubt it’s under DDoS attack? There is a simple code for you to check it’s under DDoS attack or not!
Run this command:
netstat -alpn &#124; grep :80 &#124; awk '{print $5}' &#124;awk -F: '{print $(NF-1)}' &#124;sort &#124; uniq -c &#124; sort -n
This is not exactly going to say YES your under attack, this [...]]]></description>
			<content:encoded><![CDATA[<p>Have a server? Doubt it’s under DDoS attack? There is a simple code for you to check it’s under DDoS attack or not!</p>
<p>Run this command:</p>
<pre class="brush: bash;">netstat -alpn | grep :80 | awk '{print $5}' |awk -F: '{print $(NF-1)}' |sort | uniq -c | sort -n</pre>
<p>This is not exactly going to say YES your under attack, this code will return IP address that connected to your server and how many connection they made to your server.</p>
<p>By looking at the number connections you should know what are the chances of a client from that particular IP connecting to your server and require that many connections!</p>
<p>Above code will return results like this:</p>
<blockquote><p><span style="color: #ff0000;">1</span><br />
<span style="color: #ff0000;">1</span> xxx.xxx.xxx.xxx<br />
<span style="color: #ff0000;">2</span> xxx.xxx.xxx.xxx<br />
<span style="color: #ff0000;">50 </span>xxx.xxx.xxx.xxx<br />
<em>xxx.xxx.xxx.xxx = IP address</em></p></blockquote>
<p>Number in the First column is the Number of connections established from that particular IP address. (<span style="color: #ff0000;">NumberofConnections</span> [SPACE] IP Address)</p>
<p>You will see that there is huge jump in number of connections from one or many IP’s (50 is for demonstration only how many is up to you). Many servers do not require having that many connections from a single IP. What to do next, is your choice, you could install security mods and setup firewalls to block these IP’s and so on. Do a little google search and you will find lots and lots of answers on “how to block DDoS attack?”</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloodyerror.com/2009/07/unix-shell-command-to-detect-ddos-attack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
