Author |
Message |
jayant
Team Member
Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India
|
Posted:
Thu May 15, 2003 2:04 pm (21 years, 7 months ago) |
|
I wish to ban certain IPs and Browsers from going to any part on the website. These browsers are basically some robots which keep on trying to access some URLs like /cgi-bin/formmail.pl etc and lot of 404 errors get generated in return. How can I redirect those to some website like yahoo.com or simple serve them /disabled.html always irrespective of what they asked for. |
________________________________ Jayant Kumar
Member of the 4WebHelp Team
Nibble Guru - Computing Queries Demystified
GZip/ Page Compression Test |
|
|
|
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Thu May 15, 2003 2:24 pm (21 years, 7 months ago) |
|
Can't you have a robots.txt file at your site root with something like:
Code: | User-agent: *
Disallow: /cgi-bin |
I'm not sure if thats correct as it ages ago I looked in to this. |
|
|
|
|
Ben
Senior WebHelper
Joined: 08 Jan 2002
Posts: 431
Location: Liverpool - UK
|
Posted:
Thu May 15, 2003 2:31 pm (21 years, 7 months ago) |
|
robots.txt won't do it, that only works if a robot reads it and obeys it, it doesn't stop access. |
________________________________ Ben Scott
Red and White Kop |
|
|
|
jayant
Team Member
Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India
|
Posted:
Thu May 15, 2003 3:34 pm (21 years, 7 months ago) |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Thu May 15, 2003 4:03 pm (21 years, 7 months ago) |
|
|
|
|
eBizAlive
Junior WebHelper
Joined: 03 Jul 2003
Posts: 4
|
Posted:
Thu Jul 03, 2003 9:58 pm (21 years, 5 months ago) |
|
As for nulrouting IPs you can SSH in and
Code: | /sbin/route add -host <IP-number here> reject |
This will kill all incoming and outgoing connections from that IP until you reboot the server. However, if you reboot the server, the null route is gone. If you would like to save the null route after rebooting to protect you in the future, just add the command to
Code: | pico /etc/rc.d/rc.local |
and it will re-execute them when the server comes back online.
John |
________________________________ http://www.ebizalive.net
Multiple Domain and Reseller Hosting |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Jul 04, 2003 7:57 am (21 years, 5 months ago) |
|
Unfortunately these days it is getting harder and harder to get shell access with hosting due to abuse , but thanks for the tip! |
________________________________
|
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Fri Jul 04, 2003 9:33 am (21 years, 5 months ago) |
|
also, I believe you'd probably need root access to do that... |
________________________________ It's turtles all the way down... |
|
|
|
Mart
Junior WebHelper
Joined: 26 Jan 2002
Posts: 9
Location: Northant's U.K
|
Posted:
Fri Jul 04, 2003 7:29 pm (21 years, 5 months ago) |
|
jayant,
Could you use .htaccess
With something along the lines of
in the folder you wish to preventing directory listing.
Mart. |
|
|
|
|
jayant
Team Member
Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India
|
Posted:
Wed Jul 09, 2003 5:07 pm (21 years, 5 months ago) |
|
|
|
|
|
Page generation time: 0.12972 seconds :: 18 queries executed :: All Times are GMT
Powered by
phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme