SSH attacks


 
Thread Tools Search this Thread
Special Forums Cybersecurity SSH attacks
# 8  
Old 11-10-2011
That sounds very secure indeed. They'll still clutter up your log files, but oh well.
# 9  
Old 04-07-2012
Maybe you can invoke this script
Code:
#!/bin/bash

(( ${#} != 1 )) && lim=10 || lim=${1}
while read num IP; do
      if (( num > lim )); then
            if ! grep ${IP} /etc/hosts.deny; then
                echo "sshd:${IP}" >> /etc/hosts.deny
            fi
      fi
done < <(awk '/Failed/{print $(NF-3)}' /var/log/secure | sort -g | uniq -c)

or
Code:
#!/bin/bash

(( ${#} != 1 )) && lim=10 || lim=${1}
while read num IP; do
      (( num > lim )) && /sbin/iptables -A INPUT -s ${IP} -j DROP
done < <(awk '/Failed/{print $(NF-3)}' /var/log/secure | sort -g | uniq -c)

add the script to crontab!
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Report on Javascript attacks on Unix

1. The problem statement, all variables and given/known data: Prepare a report discussing from an administration and security perspective, role and function of a JavaScript within a UNIX network. You should illustrate your answer with practical examples. In particular attention should me paid to... (1 Reply)
Discussion started by: afdesignz
1 Replies

2. Windows & DOS: Issues & Discussions

Stanford security experts unveil defenses against ‘phishing’ attacks

It's an online con that is growing fast and stealing tens of millions of dollars. An e-mail seemingly from a financial institution instructs you to log on to a legitimate-looking Web site. Such “phishing” attacks exploit a universal weakness in online security: passwords. To read the rest of... (0 Replies)
Discussion started by: ZOverLord
0 Replies

3. Cybersecurity

Denial of Services Attacks and Vulnerabilities

I've recently registered for the site and have found it very useful thus far. However, I am a student currently researching network attacks, specifically, denial of services and the damage posed to operating systems. If you have any information about this topic, please send to me. Thanks,... (1 Reply)
Discussion started by: darandkat
1 Replies

4. Cybersecurity

Unix attacks in the last 5 years.

Hi, Could anyone direct me to any sites that have any info on unix attcks or hacks in the last 5 years. This is needed for an assignment. All help would be greatly appreciated. Thanks:) (6 Replies)
Discussion started by: suzant
6 Replies
Login or Register to Ask a Question