<?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: Debian Linux Stop SSH User Hacking / Cracking Attacks with DenyHosts Software</title> <atom:link href="http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Sam Tuke</title><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-59654</link> <dc:creator>Sam Tuke</dc:creator> <pubDate>Fri, 27 May 2011 14:17:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-59654</guid> <description>For the rest of us whose ISPs allocate dynamic IP ranges, to ensure that you yourself never get blocked by denyhosts define IP ranges in hosts.allow like this:
sshd: 80.0.0.0/83.0.0.0
Also remember that if you use key authentication to login rather than passwords then you are unlikely to ever supply incorrect details, and therefore should not be at risk of ever blocking yourself, even if you don&#039;t specify your IP in hosts.allow.</description> <content:encoded><![CDATA[<p>For the rest of us whose ISPs allocate dynamic IP ranges, to ensure that you yourself never get blocked by denyhosts define IP ranges in hosts.allow like this:</p><p>sshd: 80.0.0.0/83.0.0.0</p><p>Also remember that if you use key authentication to login rather than passwords then you are unlikely to ever supply incorrect details, and therefore should not be at risk of ever blocking yourself, even if you don&#8217;t specify your IP in hosts.allow.</p> ]]></content:encoded> </item> <item><title>By: Tapas Mishra</title><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-50263</link> <dc:creator>Tapas Mishra</dc:creator> <pubDate>Thu, 21 Oct 2010 15:06:09 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-50263</guid> <description>Well the above command
tcpdchk -v gives me an error
Cannot find your inetd.conf or tlid.conf file.
Please specify its location.</description> <content:encoded><![CDATA[<p>Well the above command<br
/> tcpdchk -v gives me an error</p><p>Cannot find your inetd.conf or tlid.conf file.<br
/> Please specify its location.</p> ]]></content:encoded> </item> <item><title>By: rohit</title><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-48745</link> <dc:creator>rohit</dc:creator> <pubDate>Thu, 12 Aug 2010 03:00:47 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-48745</guid> <description>sorry,
but i can&#039;t get that.</description> <content:encoded><![CDATA[<p>sorry,<br
/> but i can&#8217;t get that.</p> ]]></content:encoded> </item> <item><title>By: Al B..</title><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-45702</link> <dc:creator>Al B..</dc:creator> <pubDate>Wed, 27 Jan 2010 14:48:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-45702</guid> <description>I did the same thing as Mehdi using a cron.hourly\perl script.... then I used UFW to deny the host IP. I wish I knew about this article earlier....</description> <content:encoded><![CDATA[<p>I did the same thing as Mehdi using a cron.hourly\perl script&#8230;. then I used UFW to deny the host IP. I wish I knew about this article earlier&#8230;.</p> ]]></content:encoded> </item> <item><title>By: Mehdi</title><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-42763</link> <dc:creator>Mehdi</dc:creator> <pubDate>Tue, 28 Jul 2009 10:54:07 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-42763</guid> <description>Thanks a lot for the info.
You&#039;d be surprised if you looked at /var/log/auth.log file as I was.
I found a little widget that you can run to grep the IP addresses of intruders;
grep &#039;from&#039; /var/log/auth.log&#124;cut -d &#039; &#039; --field=13&#124;uniq -c&#124;sort -nr &gt; ct-result.txt
Here I put the result from column 13th into a text file called ct-result.txt
you can see most of the IP addresses which were trying to break in.
sometimes it is the 14th column so I have not found a perfect way to grab all the IP addresses yet, if anyone has a better idea please post.
In any case I also get the result and put them in my hosts.deny file under /etc/
(again I have problem as to How to input these IP addresses in hosts.deny file, some say you have to put a slash at the end of the IP addresses? Not sure?)
like;
64.70.12.230\
or
210.51.51.*\
(these are actual chinese addresses trying to hack my system lol) :D
Many Thanks for the info.
I am going to test denyhost program on my workstation now.</description> <content:encoded><![CDATA[<p>Thanks a lot for the info.<br
/> You&#8217;d be surprised if you looked at /var/log/auth.log file as I was.</p><p>I found a little widget that you can run to grep the IP addresses of intruders;<br
/> grep &#8216;from&#8217; /var/log/auth.log|cut -d &#8216; &#8216; &#8211;field=13|uniq -c|sort -nr &gt; ct-result.txt</p><p>Here I put the result from column 13th into a text file called ct-result.txt<br
/> you can see most of the IP addresses which were trying to break in.<br
/> sometimes it is the 14th column so I have not found a perfect way to grab all the IP addresses yet, if anyone has a better idea please post.</p><p>In any case I also get the result and put them in my hosts.deny file under /etc/<br
/> (again I have problem as to How to input these IP addresses in hosts.deny file, some say you have to put a slash at the end of the IP addresses? Not sure?)<br
/> like;<br
/> 64.70.12.230\<br
/> or<br
/> 210.51.51.*\<br
/> (these are actual chinese addresses trying to hack my system lol) :D<br
/> Many Thanks for the info.<br
/> I am going to test denyhost program on my workstation now.</p> ]]></content:encoded> </item> <item><title>By: budacsik</title><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-38839</link> <dc:creator>budacsik</dc:creator> <pubDate>Sun, 21 Sep 2008 11:31:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-38839</guid> <description>sshdfilter also good :)
It use iptables.</description> <content:encoded><![CDATA[<p>sshdfilter also good :)<br
/> It use iptables.</p> ]]></content:encoded> </item> <item><title>By: LQman</title><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-37791</link> <dc:creator>LQman</dc:creator> <pubDate>Sat, 19 Apr 2008 22:08:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-37791</guid> <description>@kunal
You may need to install fail2ban package.
It&#039;s so simple script that work like your description above.</description> <content:encoded><![CDATA[<p>@kunal</p><p>You may need to install fail2ban package.<br
/> It&#8217;s so simple script that work like your description above.</p> ]]></content:encoded> </item> <item><title>By: NoPremium.org</title><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-37762</link> <dc:creator>NoPremium.org</dc:creator> <pubDate>Sun, 13 Apr 2008 17:43:39 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-37762</guid> <description>thanks a lot</description> <content:encoded><![CDATA[<p>thanks a lot</p> ]]></content:encoded> </item> <item><title>By: kunal</title><link>http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-37469</link> <dc:creator>kunal</dc:creator> <pubDate>Wed, 13 Feb 2008 06:10:42 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/#comment-37469</guid> <description>Locking out IP’s after multiple failed sshd login attempts
The following two rules will limit incoming connections to port 22 to no more than 3 attempts in a minute - an more than that will be dropped:
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 -j DROP</description> <content:encoded><![CDATA[<p>Locking out IP’s after multiple failed sshd login attempts</p><p>The following two rules will limit incoming connections to port 22 to no more than 3 attempts in a minute &#8211; an more than that will be dropped:</p><p>iptables -I INPUT -p tcp &#8211;dport 22 -i eth0 -m state &#8211;state NEW -m recent &#8211;set<br
/> iptables -I INPUT -p tcp &#8211;dport 22 -i eth0 -m state &#8211;state NEW -m recent &#8211;update &#8211;seconds 60 &#8211;hitcount 4 -j DROP</p> ]]></content:encoded> </item> </channel> </rss>
