<div dir="ltr">Probably not since denyhosts parses logfiles from days or weeks prior when you first run it.<br><br>Steve<br><br><div class="gmail_quote">On Mon, Aug 18, 2008 at 1:54 PM, Greg Freemyer <span dir="ltr">&lt;<a href="mailto:greg.freemyer@gmail.com">greg.freemyer@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">It added just over 1000 IPs to the hosts.deny list.<br>
<br>
Seems like a lot to me, but what do I know.<br>
<font color="#888888"><br>
Greg<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Mon, Aug 18, 2008 at 1:39 PM, Greg Freemyer &lt;<a href="mailto:greg.freemyer@gmail.com">greg.freemyer@gmail.com</a>&gt; wrote:<br>
&gt; I&#39;m going the denyhosts route.<br>
&gt;<br>
&gt; This is a CentOS server and it is in the default yum repository. &nbsp;(A<br>
&gt; couple versions old (2.4), but it should be fine.)<br>
&gt;<br>
&gt; Greg<br>
&gt;<br>
&gt; 2008/8/18 Stephen Benjamin &lt;<a href="mailto:skbenja@gmail.com">skbenja@gmail.com</a>&gt;:<br>
&gt;&gt; Hey Greg,<br>
&gt;&gt;<br>
&gt;&gt; I use DenyHosts: <a href="http://denyhosts.sourceforge.net" target="_blank">denyhosts.sourceforge.net</a><br>
&gt;&gt;<br>
&gt;&gt; Configurable to add users to /etc/hosts.deny after X number of failed<br>
&gt;&gt; attempts. &nbsp;Also can autoblock faster on unknown users and attempted root<br>
&gt;&gt; logins.<br>
&gt;&gt;<br>
&gt;&gt; It works pretty well.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; - Steve<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Aug 18, 2008 at 12:35 PM, Greg Freemyer &lt;<a href="mailto:greg.freemyer@gmail.com">greg.freemyer@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; All,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Is there a way to only allow one ksh attempt per IP per timeframe.<br>
&gt;&gt;&gt; And after X attempts to block it for an hour or so?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ===&gt; Details<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I run our webserver on a virtual slice we rent from a hosting company.<br>
&gt;&gt;&gt; &nbsp;Nothing very proprietary on it. &nbsp;In the last 60 seconds I&#39;m getting a<br>
&gt;&gt;&gt; lot of failed ksh attempts from just a couple of IPs.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Taking a look at /var/log/message I&#39;m getting a surprising amount of<br>
&gt;&gt;&gt; login attempts.:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; bash-3.00# grep &quot;check pass; user unknown&quot; messages | head<br>
&gt;&gt;&gt; Feb &nbsp;2 15:13:05 norcross sshd(pam_unix)[1861]: check pass; user unknown<br>
&gt;&gt;&gt; Feb &nbsp;2 15:13:18 norcross sshd(pam_unix)[1867]: check pass; user unknown<br>
&gt;&gt;&gt; Feb &nbsp;2 15:13:21 norcross sshd(pam_unix)[1869]: check pass; user unknown<br>
&gt;&gt;&gt; Feb &nbsp;3 01:01:49 norcross sshd(pam_unix)[9183]: check pass; user unknown<br>
&gt;&gt;&gt; Feb &nbsp;3 01:01:58 norcross sshd(pam_unix)[9185]: check pass; user unknown<br>
&gt;&gt;&gt; Feb &nbsp;3 01:02:07 norcross sshd(pam_unix)[9187]: check pass; user unknown<br>
&gt;&gt;&gt; Feb &nbsp;3 01:02:18 norcross sshd(pam_unix)[9189]: check pass; user unknown<br>
&gt;&gt;&gt; Feb &nbsp;3 09:26:40 norcross sshd(pam_unix)[9260]: check pass; user unknown<br>
&gt;&gt;&gt; Feb &nbsp;3 09:26:44 norcross sshd(pam_unix)[9262]: check pass; user unknown<br>
&gt;&gt;&gt; Feb &nbsp;3 09:26:47 norcross sshd(pam_unix)[9264]: check pass; user unknown<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; So it looks like I setup this server in Feb 2008 and I likely typed in<br>
&gt;&gt;&gt; the user name wrong a few times.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Lets see how often in the last 6 months:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; bash-3.00# grep &quot;check pass; user unknown&quot; messages | wc -l<br>
&gt;&gt;&gt; 363748<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I must say I&#39;m surprised to see that. &nbsp;I did not realize I could type<br>
&gt;&gt;&gt; that fast. :-(<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Is every hacker in the world trying to break in my little virtual server!!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I don&#39;t want to restrict access to private/public key authentication,<br>
&gt;&gt;&gt; but other than continueing to use strong passwords, is there something<br>
&gt;&gt;&gt; else I should be doing to slow down the onslaught.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Greg<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Greg Freemyer<br>
&gt;&gt;&gt; Litigation Triage Solutions Specialist<br>
&gt;&gt;&gt; <a href="http://www.linkedin.com/in/gregfreemyer" target="_blank">http://www.linkedin.com/in/gregfreemyer</a><br>
&gt;&gt;&gt; First 99 Days Litigation White Paper -<br>
&gt;&gt;&gt; <a href="http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf" target="_blank">http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The Norcross Group<br>
&gt;&gt;&gt; The Intersection of Evidence &amp; Technology<br>
&gt;&gt;&gt; <a href="http://www.norcrossgroup.com" target="_blank">http://www.norcrossgroup.com</a><br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Ale mailing list<br>
&gt;&gt;&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt;&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Ale mailing list<br>
&gt;&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Greg Freemyer<br>
&gt; Litigation Triage Solutions Specialist<br>
&gt; <a href="http://www.linkedin.com/in/gregfreemyer" target="_blank">http://www.linkedin.com/in/gregfreemyer</a><br>
&gt; First 99 Days Litigation White Paper -<br>
&gt; <a href="http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf" target="_blank">http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf</a><br>
&gt;<br>
&gt; The Norcross Group<br>
&gt; The Intersection of Evidence &amp; Technology<br>
&gt; <a href="http://www.norcrossgroup.com" target="_blank">http://www.norcrossgroup.com</a><br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="Wj3C7c">Greg Freemyer<br>
Litigation Triage Solutions Specialist<br>
<a href="http://www.linkedin.com/in/gregfreemyer" target="_blank">http://www.linkedin.com/in/gregfreemyer</a><br>
First 99 Days Litigation White Paper -<br>
<a href="http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf" target="_blank">http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf</a><br>
<br>
The Norcross Group<br>
The Intersection of Evidence &amp; Technology<br>
<a href="http://www.norcrossgroup.com" target="_blank">http://www.norcrossgroup.com</a><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
</div></div></blockquote></div><br><br clear="all"><br>
</div>