Linux - SecurityThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I notice that a bot is attacking my http. I see lots of GET request sometimes 20-30 request in just a seconds! How do I block or limit http request per ip? I'm using apache. I already added module mod_evasive but it seems it was not loaded though the DOSSystemCommand command under mod_evasive20.c Ifmodule.
I agree that talking to your upstream service provider would be in order as the best place to block or filter the traffic would be before it even enters your system. Anything that you do will consume resources.
Aside from that, some things you can try locally:
1 - rate limit filtering in IPTables. This can be difficult because it requires you to balance the needs of valid traffic versus the malicious traffic.
2 - create a robots.txt, though if it is a malicious bot it is unlikely to abide by this
3 - investigate mod_dosevasive (found from seaching, don't know enough about it to endorse or not)
4 - investigate mod_security
5 - Depending on the requests, try fail2ban though it may be a little on the slow side
6 - look into using syn cookies.
Edit: to really get at the meat of the problem you will need to actually capture traffic data and then try to create a filter based upon it. This is a rather advanced topic.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.