<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Question - why are we adding tools to base (eg sshlockout) when there are general-purpose tools that already exist that do this quite well (example - fail2ban)?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>--<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Matt Emmerton<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Users [mailto:users-bounces@dragonflybsd.org] <b>On Behalf Of </b>bycn82<br><b>Sent:</b> Thursday, January 01, 2015 6:21 AM<br><b>To:</b> Matthew Dillon<br><b>Cc:</b> users@dragonflybsd.org<br><b>Subject:</b> Re: git: sshlockout - Add sshlockout utility<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><i><span style='font-family:"Verdana","sans-serif";color:#674EA7'>Hi,</span></i><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p> </o:p></span></p></div><div><p class=MsoNormal><i><span style='font-family:"Verdana","sans-serif";color:#674EA7'>I am interested in this topic. </span></i><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p> </o:p></span></p></div><div><p class=MsoNormal><i><span style='font-family:"Verdana","sans-serif";color:#674EA7'>But IMHO. I think it will be good to use IPFW, because we can use "dynamic rule" to block the traffic, and each "dynamic rule" should have it's own expiry. </span></i><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p> </o:p></span></p></div><div><p class=MsoNormal><i><span style='font-family:"Verdana","sans-serif";color:#674EA7'>So this sshlockout just need to monitor the ssh log and determine when and how to insert a correct "dynamic rule".</span></i><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p> </o:p></span></p></div><div><p class=MsoNormal><i><span style='font-family:"Verdana","sans-serif";color:#674EA7'>And suggestion?</span></i><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Verdana","sans-serif";color:#674EA7'><o:p> </o:p></span></p></div><div><p class=MsoNormal><i><span style='font-family:"Verdana","sans-serif";color:#674EA7'>Regards,</span></i><o:p></o:p></p></div><div><div><div><div><div><div><div><div><div><div><div><p class=MsoNormal><i><span style='font-family:"Verdana","sans-serif";color:#674EA7;background:white'>Bill Yuan</span></i><o:p></o:p></p></div></div></div></div></div></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On 1 January 2015 at 11:24, Matthew Dillon <<a href="mailto:dillon@crater.dragonflybsd.org" target="_blank">dillon@crater.dragonflybsd.org</a>> wrote:<o:p></o:p></p><p class=MsoNormal><br>commit a4ac8286be21b1495af8ec1db83271dacaa79556<br>Author: Matthew Dillon <<a href="mailto:dillon@apollo.backplane.com">dillon@apollo.backplane.com</a>><br>Date:   Wed Dec 31 19:21:47 2014 -0800<br><br>    sshlockout - Add sshlockout utility<br><br>    * Add sshlockout utility, typically setup as a syslog pipe.  This utility<br>      monitors for failed ssh login attempts and excessive preauth failures<br>      and will add a rule via IPFW to block the originating IP.<br><br>      The operator also typically sets up a cron job to clean out the IPFW rules<br>      that have accumulated once a day.<br><br>    * See man page for details.  Still under construction (feel free to submit<br>      additional features).<br><br>      TODO - IPV6<br><br>      TODO - Use a PF table instead of IPFW, which will greatly improve<br>         performance if a lot of rules have to be added.<br><br>Summary of changes:<br> usr.sbin/Makefile                                  |   1 +<br> usr.sbin/sshlockout/Makefile                       |   6 +<br> .../monitor.1 => usr.sbin/sshlockout/sshlockout.8  |  72 +++---<br> usr.sbin/sshlockout/sshlockout.c                   | 279 +++++++++++++++++++++<br> 4 files changed, 327 insertions(+), 31 deletions(-)<br> create mode 100644 usr.sbin/sshlockout/Makefile<br> copy usr.bin/monitor/monitor.1 => usr.sbin/sshlockout/sshlockout.8 (60%)<br> create mode 100644 usr.sbin/sshlockout/sshlockout.c<br><br><a href="http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a4ac8286be21b1495af8ec1db83271dacaa79556" target="_blank">http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a4ac8286be21b1495af8ec1db83271dacaa79556</a><br><span style='color:#888888'><br><br><span class=hoenzb>--</span><br><span class=hoenzb>DragonFly BSD source repository</span></span><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>