How to ban an IP string via SSH?

They have: 25 posts

Joined: Aug 2004

Yahoo slurp spiders and trashing my website, I have about 200+ spiders crawling around and robots.txt will not elimate them, bastards have been killing my VPS for over a week now! I know there ip string is 74.6.x.x but I need to know how to ban that IP set via SSH. I tryed to use the command:
/etc/apf/apf -d 74.6.*.* but that didnt work.. Is there anyway for me to do this?

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

In /etc/hosts.deny add a new like like:

all: ip.address.here

That should do it.

EDIT: Hmm, I tried it and it didn't work. That's what I use to block people trying to get into ssh, I figured all: (instead of just ssh: ) would have blocked them totally.

WEBDOMAIN.com's picture

They have: 4 posts

Joined: Jul 2006

If you are on cPanel servers, you may consider CSF.
It is way better than APF, Free as well and continuously updated.

You can also control all its settings through WHM control panel.

WEBDOMAIN.com: WHERE IT ALL BEGINS!
█ We host web sites and register domain names since 2000.
CLICK HERE TO CONTACT A SALES REPRESENTATIVE LIVE!

Freedom's picture

They have: 110 posts

Joined: Oct 2006

Maybe you have deny it from .htacces file?

knorr's picture

They have: 171 posts

Joined: Sep 2006

I think .htaccess file must help you much with it.

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Put this in an .htaccess file.

order allow,deny
deny from 74.6.
allow from all
'

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.