<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Using IPTables to Prevent SSH Brute Force Attacks</title>
	<atom:link href="http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html</link>
	<description>Java, ATG, Seam, and related Technologies</description>
	<lastBuildDate>Wed, 10 Mar 2010 20:48:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Devon</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-48349</link>
		<dc:creator>Devon</dc:creator>
		<pubDate>Mon, 09 Nov 2009 18:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-48349</guid>
		<description>Good to know. It looks like the deamon mode is new-ish.  However it defeats the non-root aspect you mention:

&lt;blockquote&gt;
If you are running DenyHosts in daemon mode then yes you must run DenyHosts as root.
&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>Good to know. It looks like the deamon mode is new-ish.  However it defeats the non-root aspect you mention:</p>
<blockquote><p>
If you are running DenyHosts in daemon mode then yes you must run DenyHosts as root.
</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: tx</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-48348</link>
		<dc:creator>tx</dc:creator>
		<pubDate>Mon, 09 Nov 2009 18:13:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-48348</guid>
		<description>Denyhosts can be run in daemon mode which will actively monitor ssh logins and update hosts.deny immediately.  Further it is possible to run the daemon as a non-root user (see http://denyhosts.sourceforge.net/faq.html#3_1).  And lastly it is possible to tell denyhosts to block only a specified service instead of all services.  Personally, I would rather block all communication from a compromised host.</description>
		<content:encoded><![CDATA[<p>Denyhosts can be run in daemon mode which will actively monitor ssh logins and update hosts.deny immediately.  Further it is possible to run the daemon as a non-root user (see <a href="http://denyhosts.sourceforge.net/faq.html#3_1)" rel="nofollow">http://denyhosts.sourceforge.net/faq.html#3_1)</a>.  And lastly it is possible to tell denyhosts to block only a specified service instead of all services.  Personally, I would rather block all communication from a compromised host.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: questionablemoose</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-30347</link>
		<dc:creator>questionablemoose</dc:creator>
		<pubDate>Fri, 06 Mar 2009 07:05:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-30347</guid>
		<description>Instead of spending 15 minutes checking auth.log, I now spend about 30 seconds. Works brilliantly as far as I&#039;m concerned. Thanks!</description>
		<content:encoded><![CDATA[<p>Instead of spending 15 minutes checking auth.log, I now spend about 30 seconds. Works brilliantly as far as I&#8217;m concerned. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devon</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-15522</link>
		<dc:creator>Devon</dc:creator>
		<pubDate>Fri, 09 Jan 2009 12:30:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-15522</guid>
		<description>@James:  Yes, it&#039;s a similar approach.  However there are a few reasons you might want to consider using the iptables rules instead of the denyhosts service:

DenyHosts runs periodically (either via cron or as a deamon), and in the FAQ the author recommends running it every 10 minutes.  Your server will take a very high number of brute force attempts in 10 minutes.  The iptables rule will block after 4 attempts, much more quickly than denyhosts, and hence reduces the chances of a successful brute forcing attempt.

I don&#039;t like running processes as root, like DenyHosts.  The only real advantage of DenyHosts is the new synchronization mode, which would let you block servers that haven&#039;t even attacked you yet, saving your the four attempts the iptables rule would allow.  However, running a python script as root, that pulls data from a 3rd party non-SSL server and then uses that data to modify my server&#039;s hosts.deny file.  Doubly so when that data is already being collected from other users of this 3rd party service.  I&#039;m not sure what prevents a malicious user of the service from submitting perfectly legit IPs or IP ranges and having the synchronization service push that data out to all the other users.  I.e. I could submit all Comcast IPs and have them get blocked by users of the service, even though they are legit.  Also, with the lack of SSL, I&#039;d worry about the possibility of cache poisoning or DNS poisoning attacks being another vector to poison the data going into the hosts.deny file.

The hosts.deny file is used for ALL services, not just SSH.  This would prevent people with infected PCs from visiting your websites.  

The hosts.deny file is only read by tcpwrappers, and not all programs use it, so if I really did want to block all services, it might not suffice.

Mostly it comes down to me liking the control that iptables gives me, and being somewhat paranoid:)</description>
		<content:encoded><![CDATA[<p>@James:  Yes, it&#8217;s a similar approach.  However there are a few reasons you might want to consider using the iptables rules instead of the denyhosts service:</p>
<p>DenyHosts runs periodically (either via cron or as a deamon), and in the FAQ the author recommends running it every 10 minutes.  Your server will take a very high number of brute force attempts in 10 minutes.  The iptables rule will block after 4 attempts, much more quickly than denyhosts, and hence reduces the chances of a successful brute forcing attempt.</p>
<p>I don&#8217;t like running processes as root, like DenyHosts.  The only real advantage of DenyHosts is the new synchronization mode, which would let you block servers that haven&#8217;t even attacked you yet, saving your the four attempts the iptables rule would allow.  However, running a python script as root, that pulls data from a 3rd party non-SSL server and then uses that data to modify my server&#8217;s hosts.deny file.  Doubly so when that data is already being collected from other users of this 3rd party service.  I&#8217;m not sure what prevents a malicious user of the service from submitting perfectly legit IPs or IP ranges and having the synchronization service push that data out to all the other users.  I.e. I could submit all Comcast IPs and have them get blocked by users of the service, even though they are legit.  Also, with the lack of SSL, I&#8217;d worry about the possibility of cache poisoning or DNS poisoning attacks being another vector to poison the data going into the hosts.deny file.</p>
<p>The hosts.deny file is used for ALL services, not just SSH.  This would prevent people with infected PCs from visiting your websites.  </p>
<p>The hosts.deny file is only read by tcpwrappers, and not all programs use it, so if I really did want to block all services, it might not suffice.</p>
<p>Mostly it comes down to me liking the control that iptables gives me, and being somewhat paranoid:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-15519</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 09 Jan 2009 10:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-15519</guid>
		<description>Is this not similar (if a little simpler) to the denyhosts service?</description>
		<content:encoded><![CDATA[<p>Is this not similar (if a little simpler) to the denyhosts service?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Querystring &#187; Brute force attack on Twitter</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-15489</link>
		<dc:creator>Querystring &#187; Brute force attack on Twitter</dc:creator>
		<pubDate>Thu, 08 Jan 2009 08:32:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-15489</guid>
		<description>[...] Wired Threat Level has posted an interview with the hacker who recently broke into several high profile twitter accounts, such as Fox News, and Barack Obama. Since we know how much you all love twitter, we thought you might want to learn more about it. Apparently he used a brute force method to get into a member of the support team. The password was &#8220;happiness&#8221; which was cracked pretty quickly. This might be a good time to review your own strategies to prevent brute force attacks. [...]</description>
		<content:encoded><![CDATA[<p>[...] Wired Threat Level has posted an interview with the hacker who recently broke into several high profile twitter accounts, such as Fox News, and Barack Obama. Since we know how much you all love twitter, we thought you might want to learn more about it. Apparently he used a brute force method to get into a member of the support team. The password was &#8220;happiness&#8221; which was cracked pretty quickly. This might be a good time to review your own strategies to prevent brute force attacks. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brute force attack on Twitter - Hack a Day</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-15478</link>
		<dc:creator>Brute force attack on Twitter - Hack a Day</dc:creator>
		<pubDate>Thu, 08 Jan 2009 00:14:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-15478</guid>
		<description>[...] Wired Threat Level has posted an interview with the hacker who recently broke into several high profile twitter accounts, such as Fox News, and Barack Obama. Since we know how much you all love twitter, we thought you might want to learn more about it. Apparently he used a brute force method to get into a member of the support team. The password was &#8220;happiness&#8221; which was cracked pretty quickly. This might be a good time to review your own strategies to prevent brute force attacks. [...]</description>
		<content:encoded><![CDATA[<p>[...] Wired Threat Level has posted an interview with the hacker who recently broke into several high profile twitter accounts, such as Fox News, and Barack Obama. Since we know how much you all love twitter, we thought you might want to learn more about it. Apparently he used a brute force method to get into a member of the support team. The password was &#8220;happiness&#8221; which was cracked pretty quickly. This might be a good time to review your own strategies to prevent brute force attacks. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-10194</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Fri, 22 Aug 2008 08:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-10194</guid>
		<description>Thnx this helps me out a lot, I was looking for something like this already.

@Andries
Still some clients (like on iphone) don&#039;t support different ports then 22</description>
		<content:encoded><![CDATA[<p>Thnx this helps me out a lot, I was looking for something like this already.</p>
<p>@Andries<br />
Still some clients (like on iphone) don&#8217;t support different ports then 22</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devon</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-9724</link>
		<dc:creator>Devon</dc:creator>
		<pubDate>Sun, 10 Aug 2008 02:37:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-9724</guid>
		<description>@Andreis: Good question.

A few answers: 

1) a different port is a good idea for part of a security solution, but you should still have measures in place to prevent brute force attacks.  Port scanning to identify ssh server ports isn&#039;t hard.  You might duck a large number of automated scanners, but it won&#039;t do anything for a targeted attack.  My solution will.  So you should do the above anyhow:)

2) one of the main reasons I don&#039;t run on a different port myself is convenience.  I ssh in from a large number of other servers, and scp files frequently.  Having to specify a port every time I do any of that would be a pain.</description>
		<content:encoded><![CDATA[<p>@Andreis: Good question.</p>
<p>A few answers: </p>
<p>1) a different port is a good idea for part of a security solution, but you should still have measures in place to prevent brute force attacks.  Port scanning to identify ssh server ports isn&#8217;t hard.  You might duck a large number of automated scanners, but it won&#8217;t do anything for a targeted attack.  My solution will.  So you should do the above anyhow:)</p>
<p>2) one of the main reasons I don&#8217;t run on a different port myself is convenience.  I ssh in from a large number of other servers, and scp files frequently.  Having to specify a port every time I do any of that would be a pain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andries Louw Wolthuizen</title>
		<link>http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html/comment-page-1#comment-9723</link>
		<dc:creator>Andries Louw Wolthuizen</dc:creator>
		<pubDate>Sun, 10 Aug 2008 02:26:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=119#comment-9723</guid>
		<description>Why would you run SSH on port 22? Running sSH on a other port is a simple solution, that keeps most of the attempts out.</description>
		<content:encoded><![CDATA[<p>Why would you run SSH on port 22? Running sSH on a other port is a simple solution, that keeps most of the attempts out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
