Skip to content
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

denial of service #30

Closed
masell opened this issue Nov 16, 2014 · 5 comments
Closed

denial of service #30

masell opened this issue Nov 16, 2014 · 5 comments

Comments

@masell
Copy link

masell commented Nov 16, 2014

You clame a limit based on ipaddress, however you read that "address" from httpheaders, X-real-ip, which I assume can be anything I as sender can set.
So, the limit will not work.

@typpo
Copy link
Owner

typpo commented Nov 16, 2014

That's a good point. The X-Real-IP header is set by my nginx reverse proxy. So it's not a problem for textbelt.com. However, if you are running this on your own, you will need to set that header correctly. I should update the documentation to reflect this. 41abd43 adds an example nginx configuration.

@masell
Copy link
Author

masell commented Nov 16, 2014

Hm.
Why?

Can't you get the ipaddress in a proper way? Without setting this header...

Also, you are not handling proxys, x-forwarded-for is the "standard" header for those. Meaning I could get a list of proxys and send more then allowed quota.

@typpo
Copy link
Owner

typpo commented Nov 16, 2014

Without setting the header, all forwarded nginx traffic will appear to originate from 127.0.0.1.

Unfortunately, people can always abuse IP-based limits with proxies. Using X-Forwarded-For instead of X-Real-IP won't prevent this. The intent of the header check is just to allow the server to run behind a load balancer. If the server isn't behind a load balancer, the current check would let an attacker spoof their rate limited IP by setting the header.

typpo pushed a commit that referenced this issue Nov 16, 2014
@daluu
Copy link
Collaborator

daluu commented Jul 19, 2015

Just my thoughts, but #41 and #42 could be alternative ways to address rate limiting and abuse prevention over IP based approach. However, I speak to this from the perspective of the self hosting option. For the public hosted service, it's fine to me the way it is now.

@typpo
Copy link
Owner

typpo commented Mar 14, 2019

IP rate limiting has been removed.

@typpo typpo closed this as completed Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants