-
Notifications
You must be signed in to change notification settings - Fork 50
Add rate limiter for insertions and deletions #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Can't we use this tower layer instead of pulling in yet another dependency? |
One could, but I tried to achieve something different: Such a layer will rate-limit all requests, including viewing existing pastes. This can also being achieved via a DDOS in a proxy webserver, used for TLS encryption (nginx/apache). |
|
I'll slate this and the other open PRs for the release after the next one. A lot of good and non-controversial stuff has piled up already and deserves to be properly released. |
|
I was thinking a bit about the usefulness. First of all: I hope no one is running this pastebin facing the internet and I don't think that we should add complexity that could be mitigated differently for internal networks. Second: isn't this penalizing everyone instead of the caller? |
cb5a690 to
6c7c60d
Compare
Add options to rate limit insertion and deletions. Disabled by default.
iptables example: iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent nginx example (also caddy or Traefic can do this i believe): }` fail2ban can be made to work with webserver/proxy logs and/or iptable logs And most CDN's like Cloudflare have several methods for rate limiting available. For example if you would expose this tool to the internet via cloudflare tunnel, it would be easy to set a rate limiting rule in the WAF, on top of the usual DDOS and bot protection offered by cloudflare. |
As you say it yourself, rate limiting is hard but there are ways. I do consider the application robust enough to host it on the open internet but without any authentication it's just begging for abuse. That's what I mean by not running it as is facing the internet. But I appreciate the concern and will add a remark in the README.md to be aware that authentication is not planned and thus it's not a good idea to host the software publicly. |
Add options to rate limit insertion and deletions. Disabled by default.