Re: How to Stop Bruit Force ssh Attempts?

2006-04-12 Thread Ean Kingston
On Tuesday 11 April 2006 21:35, Jonathan Franks wrote:
 On Mar 18, 2006, at 12:39 PM, Chris Maness wrote:
  In my auth log I see alot of bruit force attempts to login via
  ssh.  Is there a way I can have the box automatically kill any tcp/
  ip connectivity to hosts that try and fail a given number of
  times?  Is there a port or something that I can install to give
  this kind of protection.  I'm still kind of a FreeBSD newbie.

I setup SSH to use public key authentication only. That way they can hammer 
away at my ssh server till the cows come home and they will never get in with 
a password.

I also use tcpwrappers (built into ssh daemon) for the particularly obnoxious 
ones.

 If you are using PF, you can use source tracking to drop the
 offenders in to a table... perhaps after a certain number of attempts
 in a given time (say, 5 in a minute). Once you have the table you're
 in business... you can block based on it... and then set up a cron
 job to copy the table to disk every so often (perhaps once every two
 minutes). It works very well for me, YMMV.

 If you don't want to block permanently, you could use cron to flush
 the table every so often too... I don't bother though.

 -Jonathan

-- 
Ean Kingston, BSc, CISSP, ARO
Computer Security and Privacy Consulting
PGP KeyID: CBC5D6BB
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-04-11 Thread Jonathan Franks


On Mar 18, 2006, at 12:39 PM, Chris Maness wrote:

In my auth log I see alot of bruit force attempts to login via  
ssh.  Is there a way I can have the box automatically kill any tcp/ 
ip connectivity to hosts that try and fail a given number of  
times?  Is there a port or something that I can install to give  
this kind of protection.  I'm still kind of a FreeBSD newbie.


If you are using PF, you can use source tracking to drop the  
offenders in to a table... perhaps after a certain number of attempts  
in a given time (say, 5 in a minute). Once you have the table you're  
in business... you can block based on it... and then set up a cron  
job to copy the table to disk every so often (perhaps once every two  
minutes). It works very well for me, YMMV.


If you don't want to block permanently, you could use cron to flush  
the table every so often too... I don't bother though.


-Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-04-11 Thread Adam Stroud
I second that.  I have been doing the same thing (except running an 
OpenBSD firewall that blocks the offenders via pf) and it works like a 
charm.


A

Jonathan Franks wrote:


On Mar 18, 2006, at 12:39 PM, Chris Maness wrote:

In my auth log I see alot of bruit force attempts to login via ssh.  
Is there a way I can have the box automatically kill any tcp/ip 
connectivity to hosts that try and fail a given number of times?  Is 
there a port or something that I can install to give this kind of 
protection.  I'm still kind of a FreeBSD newbie.


If you are using PF, you can use source tracking to drop the offenders 
in to a table... perhaps after a certain number of attempts in a given 
time (say, 5 in a minute). Once you have the table you're in 
business... you can block based on it... and then set up a cron job to 
copy the table to disk every so often (perhaps once every two 
minutes). It works very well for me, YMMV.


If you don't want to block permanently, you could use cron to flush 
the table every so often too... I don't bother though.


-Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-04-11 Thread Chris Maness

Jonathan Franks wrote:



On Mar 18, 2006, at 12:39 PM, Chris Maness wrote:

In my auth log I see alot of bruit force attempts to login via  ssh.  
Is there a way I can have the box automatically kill any tcp/ ip 
connectivity to hosts that try and fail a given number of  times?  Is 
there a port or something that I can install to give  this kind of 
protection.  I'm still kind of a FreeBSD newbie.



If you are using PF, you can use source tracking to drop the  
offenders in to a table... perhaps after a certain number of attempts  
in a given time (say, 5 in a minute). Once you have the table you're  
in business... you can block based on it... and then set up a cron  
job to copy the table to disk every so often (perhaps once every two  
minutes). It works very well for me, YMMV.


If you don't want to block permanently, you could use cron to flush  
the table every so often too... I don't bother though.


-Jonathan


I use a port called DenyHost.  It adds an entry to hosts.allow that 
denies access.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-04-11 Thread John Cruz
I used to have problems with brute force attempts as well. I just 
changed the port that SSH uses (TCP/IP  port, not ports collection 
port) and the problems have stopped. I made it something that means 
something to me and maybe not others, so it's a simple and powerful way 
of getting the job done.


-John

Chris Maness wrote:

Jonathan Franks wrote:



On Mar 18, 2006, at 12:39 PM, Chris Maness wrote:

In my auth log I see alot of bruit force attempts to login via  
ssh.  Is there a way I can have the box automatically kill any tcp/ 
ip connectivity to hosts that try and fail a given number of  
times?  Is there a port or something that I can install to give  
this kind of protection.  I'm still kind of a FreeBSD newbie.



If you are using PF, you can use source tracking to drop the  
offenders in to a table... perhaps after a certain number of 
attempts  in a given time (say, 5 in a minute). Once you have the 
table you're  in business... you can block based on it... and then 
set up a cron  job to copy the table to disk every so often (perhaps 
once every two  minutes). It works very well for me, YMMV.


If you don't want to block permanently, you could use cron to flush  
the table every so often too... I don't bother though.


-Jonathan


I use a port called DenyHost.  It adds an entry to hosts.allow that 
denies access.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-03-18 Thread Pat Maddox
The best thing you can do is move SSH to another port and disable
password authentication, and use keys instead.

Pat

On 3/18/06, Chris Maness [EMAIL PROTECTED] wrote:
 In my auth log I see alot of bruit force attempts to login via ssh.  Is
 there a way I can have the box automatically kill any tcp/ip
 connectivity to hosts that try and fail a given number of times?  Is
 there a port or something that I can install to give this kind of
 protection.  I'm still kind of a FreeBSD newbie.

 Thanks,
 Chris Maness
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-03-18 Thread Wes Santee
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chris Maness wrote:
 In my auth log I see alot of bruit force attempts to login via ssh.  Is
 there a way I can have the box automatically kill any tcp/ip
 connectivity to hosts that try and fail a given number of times?  Is
 there a port or something that I can install to give this kind of
 protection.  I'm still kind of a FreeBSD newbie.

security/bruteforeceblocker (requires pf as the firewall)

security/denyhosts (uses tcp_wrappers and /etc/hosts.allow)

security/sshit (requires ipfw as firewall)

I rolled my own solution and haven't used any of these, so I don't know
how well they work in practice.  They probably all require some initial
setup and configuration.

Cheers,
- -Wes



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)

iQIVAwUBRBxKu4rq8W17hxGfAQh0cQ/+NjUEnYUHJgrLiq49OLvqbsH8XxXecEN0
pL2XnZ8ACv5SIVR7/ng2SO2o4HwRpc0Oio+r5GKRionnkDja4+fxxSr1hwlnQ/cC
ifm00QwSR21m8kCFnKKyl6GfrQAOa8aBXLx1+xT/FYY/wxNB5I2Otoj0BcuGrIMq
3qqhh7DT4ABVYVEtJiu3PcUr6hTU+oNnj/gvlF+lUlEI0m5WbcZPqs8cZXKFwTfa
XuK7X2LvyZMjlibfFPsVWnpCyV31L8dRfy7CrZpfe3y/RsVuww9/tC2ErzNLPlZX
6h9g41G50WNzGsv/DU6VbdiqnHEaKfmtECPH0dL/YSUYqIzC/Jj8i8IeUsL1MoIy
gLaAafy1yPGGFJlkq1erBc/KUQFcPCIoNI0ENvKMwOcbq+c+U+McdmXUqOfggKMZ
aXyklduBAF98+NewIVdAVrv69ImHVbouDj6WsyByGM9qkxFlJ5/vp6n410WUEsmd
+EkAM3h9I47xJ5/MQ/QM4mVuqY+Uqv4hkRR2xrSSXk5yquztCBvKQ94peawOZEQ9
6V6x0MfI9xNqGWvcS2cGVTbrs/TLtAa5yGLyn+TXbfIXVV8gdb9X7scWLW62TePb
b16uiRclzwBmwSyZBcZNDizchpJ9bYBVjDjt1r60PDDyBp4T9swqufdA7ypQVGzh
R7/orRajLkE=
=ztIl
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-03-18 Thread Philip Hallstrom
In my auth log I see alot of bruit force attempts to login via ssh.  Is there 
a way I can have the box automatically kill any tcp/ip connectivity to hosts 
that try and fail a given number of times?  Is there a port or something that 
I can install to give this kind of protection.  I'm still kind of a FreeBSD 
newbie.


http://www.pjkh.com/wiki/ssh_monitor

Among a lot of others...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-03-18 Thread Chris Maness

Wes Santee wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chris Maness wrote:
  

In my auth log I see alot of bruit force attempts to login via ssh.  Is
there a way I can have the box automatically kill any tcp/ip
connectivity to hosts that try and fail a given number of times?  Is
there a port or something that I can install to give this kind of
protection.  I'm still kind of a FreeBSD newbie.



security/bruteforeceblocker (requires pf as the firewall)

security/denyhosts (uses tcp_wrappers and /etc/hosts.allow)

security/sshit (requires ipfw as firewall)

I rolled my own solution and haven't used any of these, so I don't know
how well they work in practice.  They probably all require some initial
setup and configuration.

Cheers,
- -Wes

  

Thanks, I played with all three. Denyhosts is the best hands down.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-03-18 Thread Kris Anderson


--- Chris Maness [EMAIL PROTECTED] wrote:

 In my auth log I see alot of bruit force attempts to
 login via ssh.  Is 
 there a way I can have the box automatically kill
 any tcp/ip 
 connectivity to hosts that try and fail a given
 number of times?  Is 
 there a port or something that I can install to give
 this kind of 
 protection.  I'm still kind of a FreeBSD newbie.
 
 Thanks,
 Chris Maness

Hey there,
A couple of things you could try. I believe there is a
port that watches log files, utilizing that you could
create a script to add the IP to your firewall rules
then after a time remove it.

The other way is to use snort_inline and see how that
works.

Hope that helps.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Stop Bruit Force ssh Attempts?

2006-03-18 Thread Chris Maness

Kris Anderson wrote:

--- Chris Maness [EMAIL PROTECTED] wrote:

  

In my auth log I see alot of bruit force attempts to
login via ssh.  Is 
there a way I can have the box automatically kill
any tcp/ip 
connectivity to hosts that try and fail a given
number of times?  Is 
there a port or something that I can install to give
this kind of 
protection.  I'm still kind of a FreeBSD newbie.


Thanks,
Chris Maness



Hey there,
A couple of things you could try. I believe there is a
port that watches log files, utilizing that you could
create a script to add the IP to your firewall rules
then after a time remove it.

The other way is to use snort_inline and see how that
works.

Hope that helps.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
  
I'm using denyhost per someone on the lists recomendation.  It works 
very well.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]