EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #10168
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] DDoS on simple and advanced search
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, Martin Brändle <martin.braendle@uzh.ch>
- Subject: Re: [EP-tech] DDoS on simple and advanced search
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- Date: Thu, 17 Jul 2025 17:32:39 +0000
CAUTION: This e-mail originated outside the University of Southampton.
I was wondering if there isn't a better "apache" way of doing this, if we know that specific URLs are being targeted.
I got this advice from the AI, wondering if it is a worthwhile and/or functional solution to the issue? We would have to replace the URL part with the correct one for advanced and simple search. It seems like it's a way of targetting this specific part, rejecting
too many requests from the same IP per minute.
This is the most direct way to rate-limit by URL path and IP.
Install
mod_security
sudo apt install libapache2-mod-security2
Enable it
sudo a2enmod security2
sudo systemctl reload apache2
Open your ModSecurity config file, usually located at:
Add the following rules:
Any comments on that solution? It seems elegant, if it works?
Tomasz
________________________________________________
Tomasz Neugebauer
Tel. / Tél. 514-848-2424 ext. / poste 7738
Mailing address / adresse postale: 1455 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8 library.concordia.ca
From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> on behalf of David R Newman <drn@ecs.soton.ac.uk>
Sent: June 27, 2025 5:56 AM To: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>; Martin Brändle <martin.braendle@uzh.ch> Cc: Jens Witzel <jens.witzel@uzh.ch> Subject: Re: [EP-tech] DDoS on simple search Attention This email originates from outside the concordia.ca domain. // Ce courriel provient de l'extérieur du domaine de concordia.ca Hi Martin, I have to admit, I was surprised that simple search had been somewhat untouched during the DDoS that has been occurring on some repositories' advanced search. I assume like the DDoS on advanced search, the range of IPs is so wide that it is impossible to block without blocking large chunks of the Internet. The interesting thing here is that unless you have bespoke configured your simple search, the search _expression_ (i.e. exp in the GET header) looks like what I would expect to see for an advanced search, below is a more like what I would expect to see for a simple search: /cgi/search/simple?screen=Search&_action_search=1&exp=0%7C1%7C-date%2Fcreators_name%2Ftitle%7Carchive%7C-%7Cq%3A%3AALL%3AIN%3Afrog%7C-%7C&order=-date%2Fcreators_name%2Ftitle&search_offset=20 As the only search field in simple search is usually called 'q'. Approve is a search for the word frog as this appears regularly in the test data. It looks like they are using the same _expression_ that might use on advanced search and sending it simple search. Therefore, it may be sufficient to modify the LocationMatch from "^/cgi/search/archive/advanced" to just "^/cgi/search/" and then the if statements on the QUERY_STRING inside would apply to search expressions for any search. Obviously, even though the search _expression_ used on simple search looks like that for advanced search, it may not exactly match those previous DDoS search requests that you originally blocked. Regards David Newman On 27/06/2025 08:37, Martin Brändle wrote:
|
- Follow-Ups:
- Re: [EP-tech] DDoS on simple and advanced search
- From: Yuri Carrer <yuri.carrer@unipd.it>
- Re: [EP-tech] DDoS on simple and advanced search
- References:
- [EP-tech] DDoS on simple search
- From: Martin Brändle <martin.braendle@uzh.ch>
- Re: [EP-tech] DDoS on simple search
- From: David R Newman <drn@ecs.soton.ac.uk>
- [EP-tech] DDoS on simple search
- Prev by Date: [EP-tech] Remote file repository
- Next by Date: Re: [EP-tech] DDoS on simple and advanced search
- Previous by thread: Re: [EP-tech] DDoS on simple search
- Next by thread: Re: [EP-tech] DDoS on simple and advanced search
- Index(es):