Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-21-2005, 09:56 PM
|
#1
|
|
Member
Registered: Oct 2003
Location: USA Fresno Callifornia
Distribution: Gentoo (workstation), ArchLinux (file/mail server), Freebsd (web server), Ubuntu (laptop)
Posts: 115
Rep:
|
Bad guys flooding my web server
I have a little photoblog that I am running from my web server at home. Its using pixelpost software, which is coded in php. There is a page photoblogindex.php?x=xref that shows the top refferals to my site.
There are scripts or worms or something that is continously connecting to my site to move the sites they are advertising up to the top of the list.
I first tried getting rid of the xref page and thought that this would help but when they try to connect to it it just brings up a template page and not a 404 or anything and the bots keep connecting thinking that they are working. This is bogging down my oldtimer of a computer and my internet connection.
I am looking for some advise because I can not figure out what to do. Should I do something with tcp wrappers? Special access rules? Something in apache config? The sites that they are promoting change names all fo the time so blocking certain reffering sites is a constant battle.
Scott
|
|
|
|
09-22-2005, 01:41 AM
|
#2
|
|
Member
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403
Rep:
|
Could you provide soeme log dumps, and somre more specific data, maybe me or someone here can find a pattern and help you block it.
|
|
|
|
09-22-2005, 06:49 AM
|
#3
|
|
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Rep:
|
So the page they are connecting to no longer exists, ie. a human will never end up there? If so, just auto-ban any address that requests that page.
|
|
|
|
09-22-2005, 10:13 AM
|
#4
|
|
Member
Registered: Oct 2003
Location: USA Fresno Callifornia
Distribution: Gentoo (workstation), ArchLinux (file/mail server), Freebsd (web server), Ubuntu (laptop)
Posts: 115
Original Poster
Rep:
|
I like that Idea. how do I do that? Its a php page so it request for the page is like this example.com/index.php?x=ref
Could I make the php page grab the ip address and then write this to a .htaccess file? or is there an easier way?
|
|
|
|
09-22-2005, 10:49 AM
|
#5
|
|
Member
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403
Rep:
|
Quote:
Originally posted by hypexr
I like that Idea. how do I do that? Its a php page so it request for the page is like this example.com/index.php?x=ref
Could I make the php page grab the ip address and then write this to a .htaccess file? or is there an easier way?
|
That is a good idea, however, it would still be nice if you provided some data.
To supplement that idea, you might as well lof the ips and put them into the ip ban list.
|
|
|
|
09-22-2005, 12:53 PM
|
#6
|
|
Moderator
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,088
|
Moved: This thread is more suitable in Linux-Security and has been moved accordingly to help your thread/question get the exposure it deserves.
|
|
|
|
09-22-2005, 06:46 PM
|
#7
|
|
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Rep:
|
Have a look here for some code. That page is very helpful for a different but similar problem but some of the same principals apply.
|
|
|
|
09-22-2005, 10:46 PM
|
#8
|
|
HCL Maintainer
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926
Rep: 
|
This would probably be considered a bit of a lame way to avoid them, but I have
major hits from Windoze script kiddies trying exploits on my server in China. I just
changed the port from 80 to another port, and since July there have been zero of
those attempts. This does require adding the port to the link, which isn't a problem
as mine is just photos posted for "the folks back home" to view. It did, however,
eliminate the kids who aren't smart enough to do anything more than scan port 80,
and/or use non-intelligent software designed for Windoze. Which freed me up
to spend time on the real bad guys ...
|
|
|
|
09-22-2005, 10:52 PM
|
#9
|
|
Member
Registered: Oct 2003
Location: USA Fresno Callifornia
Distribution: Gentoo (workstation), ArchLinux (file/mail server), Freebsd (web server), Ubuntu (laptop)
Posts: 115
Original Poster
Rep:
|
Yeah, changing the port is a good method for avoiding this kind of thing and I need to do it for ssh (these ssh bots are getting crazy also). I don't really want web visitors having to know about ports, though.
I read through all of those examples on your link cs-cam, they will be easy to modify for my situation. I can't wait to get the time to get that going. Thanks!!
|
|
|
|
09-22-2005, 11:07 PM
|
#10
|
|
Senior Member
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016
Rep:
|
you should definitely password protect any page that lists referrers. that's what the bad guys are after, and as long as that's public, you're going to keep getting hit with new ones even if you clear out the current ones. do a google for "referrer spam" to find out more, and about prevention tactics and fixes.
>>edit: the wikipedia entry even has a sample blocking script:
http://en.wikipedia.org/wiki/Referer_spam
Last edited by slackhack; 09-22-2005 at 11:09 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:44 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|