Unable to block bruteforce attacks

modem

Verified User
Joined
Apr 7, 2004
Messages
355
Hello all,

While this may not pertain to the actual directadmin software, everyone here is very knowledgeable and this is happening on a DA based server.

Anyway I've notice din my /var/log/messages file that I'm seeing alot of various bruteforce attacks on SSH. Some of the lines look like this:

Mar 28 02:53:44 stargatesg1 sshd(pam_unix)[11749]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=manticore.eecs.harvard.edu user=root

Obviously I have my SSH set so that logging in via root is disabled and is only allowed under a secret/private account. So for the most part I'm safe, however I'd like to cut down on having this constant repeating attack eating away at bandwidth.

I figured I'd use my already in use IPtables to block a host/IP of that above person. Well considering I also use Webmin on the same server as DA, I logged into webmin, went to the Network -> Linux firewall module and setup a rule to reject all traffic from the above host.

However after I add a rule to block the TCP traffic from the host, I refresh my /var/log/messages file and see I'm still getting hammered with the attacks. Does anyone know what I should do to block this? I've seen firewalls before that are semi intelligent that will block repetatitve behavior from a host if it thinks it's a DDoS attack.

Thoughts? Opinions?
 
Yes - Linux/CentOS 3.4

Just a quick question, I assume IPTables would have to be removed with AFP being installed seperately? Would the rulesets be exportable/importable?

Your thoughts and feelings on the firewall solution you use for your servers?
 
iptables is the userspace interface into the netfilter (firewall) code in the Linux kernel.

APF+BFD is a script that creates iptables rulesets.

We use a slightly modified version of kiss for most of our servers, and APF+BFD for clients who request it.

Jeff
 
Does APF+BFD also include the ability to create a dynamic rule based on someone hammering a service like ftp, ssh, etc that after say 10 concurrent failures, that IP is banned for a predetermined amount of time?
 
also in case people don't understand what those are:

apf = advanced policy firewall

bfd = an addon for apf that scans the logs looking for patterns that look like brute force attempts, then tells APF to block that IP. BFD stands for brute force detection


www.rfxnetworks.com. That's where you can get them at
 
yep i agree, BFD + APF works smoothly.
i also run this on my server,
changing your default ssh port might help you also,
as those script kiddies wont take the time to scan your system to find out whether you run ssh on some other port

Greetings
 
Does AFP work with iptables already installed? Does iptables have to be removed?
 
Back
Top