LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-02-2013, 04:33 PM   #1
yodds
LQ Newbie
 
Registered: May 2011
Location: Camberley, Surrey, England
Distribution: Debian
Posts: 9

Rep: Reputation: 0
SSH Bruteforce attacks


Hi All, posted this a little while ago but it went missing from the forum, bit strange. I have noticed recently that I have been receiving a lot of SSH bruteforce attacks on my SSH landing server, as a precaution I have enabled google 2 step verification and also installed fail2ban which blocks permanently the IP addresses of the what can only be bots. I have a couple of questions.
Firstly, I have found this website where they publish bruteforce attempt IP addresses from the last 90 days into a text file, I want to use this file to add to a iptables deny rule(s). Do I need to run a cronjob script to import these into the deny list or can I get IP tables to check the IP addresses from the file that has been downloaded (wget via cronjob)?

Last edited by unSpawn; 05-02-2013 at 07:11 PM. Reason: //Post split ops
 
Old 05-02-2013, 07:12 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by yodds View Post
posted this a little while ago but it went missing from the forum, bit strange.
No it didn't. You didn't post it at LQ. One hundred per cent sure. Maybe you posted elsewhere.


Quote:
Originally Posted by yodds View Post
Do I need to run a cronjob script to import these into the deny list or can I get IP tables to check the IP addresses from the file that has been downloaded (wget via cronjob)?
Best way would be a daily cron job. (And try ipset instead of gazillions of iptables rules or even worse: /etc/hosts.deny.)

*I'll split your CyberARK question (completely different question) off to a separate thread: CyberARK (password vault) Open Source alternative?

Last edited by unSpawn; 05-02-2013 at 07:13 PM. Reason: //Post split ops
 
Old 05-03-2013, 07:57 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,647
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
If they are attempting to break in by shoving passwords down your throat, there is your real problem: you have an open avenue shell access to your computer, with only a password standing in the way.

You should be using digital certificates, each one encrypted with a passphrase. You should specifically prohibit the use of password authentication. (Remember that SSH will, quite inexplicably, accept the least powerful identification-mechanism that it has been told that it's permitted to use, so you must block all options except certificates.)

Yes, when you shell into that computer, you won't be asked for a password ... because you're wearing your badge. Only this arrangement can be called "truly secure."
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh bruteforce maail Linux - Newbie 12 06-24-2012 01:52 AM
Slow ssh attacks david1941 Linux - Security 8 11-29-2009 06:17 PM
SSH attacks, a new approach david1941 Linux - Security 10 09-13-2008 01:16 PM
Compromised by SSH bruteforce MBH Linux - Security 3 09-16-2005 10:10 PM
ssh bruteforce DoS branden_burger Linux - Security 10 03-29-2005 02:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration