Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rate-limiting]

In computer networks, rate limiting is used to control the rate of traffic sent or received on a network interface.

0
votes
0answers
28 views

limit_req_zone for the whole PHP

I'm protecting wp-login.php via below rule: location = /wp-login.php { limit_req zone=one burst=1 nodelay; include fastcgi_params; fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; } My ...
0
votes
1answer
15 views

How to configure Nginx to only rate limit the API and not static files?

Because limit_req_zone must be specified in HTTP context and cannot be in server or even in location context, it seems one can only set a rate limit for the entire server. Nginx is used to serve ...
0
votes
0answers
10 views

Nginx: rate limiting for try_files

I cannot figure out how to apply a rate limit only to static files served with try_files (and not for @app location). Is it possible? Here's my configuration: limit_req_zone $binary_remote_addr zone=...
0
votes
0answers
32 views

HAProxy rate limiting per URL, with client IP in custom header set by reverse proxy

In our current setup CloudFlare is used as a DNS level load balancer, in front of our HAProxy load balancers, which further route requests to our NginX application servers. We only server dynamic ...
0
votes
0answers
17 views

Include rate limited requests in Nginx rate limit calculations ('strict' rate-limiting)

I have set up nginx as a reverse proxy for my webapp. I have configured nginx to rate-limit login requests to 10/minute with a burst up to 20: limit_req_zone $remote_addr zone=login:10m rate=10r/m; ...
2
votes
1answer
54 views

BIND DNS rate-limit: qps-scale understanding

I have a few questions concerning qps-scale and how it is used when rate-limit option is used in BIND. Referencing: http://www.zytrax.com/books/dns/ch7/hkpng.html#rate-limit and https://ftp.isc.org/...
0
votes
0answers
85 views

How to rate limit with an api key (Apache/nginx)

I have an API in PHP and want to rate limit it into various tiers, with different tiers having different rates. Each user will be assigned a tier, and an API key for use in the URL. So for example ...
-1
votes
1answer
53 views

Ban IP addresses based on bandwidth usage on apache/linux

Is it possible to throttle or ban IP address based on how much the host is using bandwidth of my webserver? In ideal situation I would like to create rules like: if IP uses bandwidth over 1000 MB ...
1
vote
0answers
30 views

Configure postfix to send emails per domain from each virtual server

In my setup I have installed virtualmin for virtual servers. I have following virtual servers with their own dedicated ip address. Postfix is configured as per this method to use dedicated ip for each ...
0
votes
1answer
58 views

Nginx rate limiting - only slowdown if ceiling hit

We recently switched to nginx and I was happy to see that rate limiting seems easy enough there. I set up the following limit for a particular zone: limit_req_zone $binary_remote_addr zone=...
0
votes
0answers
12 views

Block web site downloading programs like HTTrack

I have a lot of big downloads on my web site, so if somebody tries to download my whole site using automated software like HTTrack, it causes a heavy load on my server. Is there a way to block ...
1
vote
0answers
25 views

How to limit destination IPs for nginx cache proxy

I'm trying to set up nginx as a cache proxy that can cache/serve pages only from one IP range (example: 31.29.100.0/24). To set up the proxy I use this conf: server { listen 8080; location / ...
0
votes
1answer
90 views

How to protect a web application from IPv6 bots?

I'm interested in this in the context of protecting a web application from bots, but I guess it applies to all kind of attacks that can be done over IPv6 by bots. In a web application, you have some ...
0
votes
1answer
39 views

Windows AD. Is there a limit of successful authentications requests per given account?

We're running bulk automation scripts in our environment. Hundreds of threads simultaneously that use the same AD account for authentication. At some point we got this account locked out while no ...
2
votes
0answers
170 views

Any experience with Nginx Rate limiting in HTTPS scenario?

Does anyone have experience with rate limiting on Nginx HTTPS server listening on port 443? As per my testing, rate limiting seems to work well with Nginx listening on port 80 but I don't get expected ...
1
vote
0answers
183 views

Nginx: Limit request based on response status code

I'm trying to limit requests with nginx based on response status code. I'd like to slow down requests with too many 4xx or 5xx responses. I have this code block in my config file: map $status $...
1
vote
0answers
51 views

Outbound rate limiting (with a buffer) per IP

My software has to interact via HTTP requests with several third party services, and these service enforce a rate limiter policy on their side. If I go above the rate limit, my server which is running ...
0
votes
0answers
120 views

Postfix email throttling for deferred queue

I have an issue with email sending speeds on postfix. the email to yahoo are getting throttled and getting suspended temporarily. I edited the main.cf configuration to slower down the speeds and add a ...
0
votes
1answer
334 views

Specify all php files in Nginx config in order to make said php app more safe (nginx)

I got an idea for to write a simple script to create an Nginx config file based on a set of files that would be allowed to be run. In my case they would be .php files from an application. The script ...
0
votes
1answer
75 views

How can throttle users but whitelist robot access to my web site?

I am looking at using mod_evasive and/or mod_throttle to prevent abusive access to my web site (running Apache 2.4). By "abusive", I mean using wget or HTTtrack to download the whole web site, for ...
0
votes
1answer
52 views

Any way to see the password for attempted RDP intrusions? [closed]

I have a silly person in china (According to IP-Reversal websites) who is trying to login to my machine using RDP. I first noticed this when I found a stream of messages similar to this one: [LAN ...
0
votes
1answer
23 views

Exchange limit repetitive messages

Background: We have an Avaya phone system, which has the capability of sending email alerts for a variety of scenarios. One scenario that I am very interested in is alerts when a trunk goes down. ...
1
vote
1answer
1k views

How to limit TCP connections with nginx for HTTP/2?

I want to use nginx as a https frontend and I'm looking for a way to limit TCP connections. These limits should be based on the remote IP addresses and work for HTTP/1.1 as well as HTTP 2. For HTTP/...
2
votes
0answers
358 views

IPTables + Limit module: Why doesn't limit-burst get completely used?

Long time reader, first time poster.. yada yada yada.. Anyways, I am hopeful someone out there has some extensive iptables/netfilter LIMIT or HASHLIMIT module experience and explain the behavior I'm ...
0
votes
1answer
120 views

Limit bandwidth for two sources of traffic together but not one of them

There are 2 sources of traffic The first one of them shouldn't be impeded in any way, it should be able to draw as much available traffic as it wants. The second one, on the other hand, should be ...
1
vote
1answer
1k views

Nginx Rate Limiting With CloudFlare

I want to have a Rate Limiting code with the following options: I'm using CloudFlare, so I want it to look for the real IP address. I want to have a whitelist option I want to make a file with a list ...
0
votes
2answers
201 views

Rate limiting to Azure VM

Is there a way to add rate limiting to azure VM? We have a VM that generates images dynamically and a few users are abusing it by hitting the server hundreds of times at once. I implemented an ...
1
vote
2answers
1k views

Nginx: Bypass rate limiting with header

This answer is perfect dealing with bypassing rate limiting with IP addresses. If I need to bypass rate limiting with a secret header, how do I achieve this? Ref: http { geo $whitelist { ...
0
votes
0answers
48 views

Nginx rate limiting at server level excluding a particular IP [duplicate]

My server is constantly being flooded and I am looking to limit the connections. I want to do this at the server level (because I have multiple websites) but every now and then I run a cache warm ...
0
votes
0answers
280 views

How can i limit incoming bandwidth for an ip

i have access to some multipurpose machines configured to do jobs for different clients. each client is a web server. since one of my web server taking too much data traffic. this system blocks me for ...
1
vote
2answers
4k views

Blocking IPs in HAProxy

A client's website is currently under attack, and I've been called in to fix it. A huge number of IPs (easily over 5,000) is constantly hitting /login, presumably trying to bruteforce their way in. ...
1
vote
1answer
439 views

nginx limit_req_zone limiting at a rate lower than specified

The limit_req_zone configuration in my config is as follow : limit_req_zone $nginx_version zone=site1:10m rate=1000r/s; I don't want more than 1000 requests per second from the zone site1. I use ...
1
vote
1answer
573 views

Limiting per-request download AND upload speed on Apache or Nginx

I'm currently running a couple of Web servers (one is Apache 2.4 based, another is running nginx 1.8). I need to set a rate limit, on each individual GET/POST request, that can throttle both download ...
0
votes
1answer
466 views

Apache return 429 only to bots, for specific urls

i have a Magento website working with Apache2 and every day i get bots crawling urls that i do not want to and i would like to return 429 for specific urls. i have tried this in my htaccess <...
0
votes
1answer
413 views

NGINX not evaluating variables?

I have a following nginx config: http { (...) limit_conn_zone $binary_remote_addr zone=limitapinoauth:16m; limit_conn_zone $remote_user zone=limitapi:32m; map $remote_user $zone { default '...
4
votes
0answers
493 views

How to configure per IP bandwidth control using TC?

Requirements: There is an arbitrary number of users per group. Bandwidth for any particular group is 1000kbps. Bandwidth for each user in a group is 70 kbps. At any time no user should not consume ...
1
vote
1answer
648 views

Nginx throttle download speed based on filesize

I am using nginx/1.11.11 compiled from the source with the mp4 module and I am serving video files from 300MB size up to 8GB. I am thinking of implementing a throttle system similar to google's drive....
0
votes
1answer
436 views

Docker IOPS and Read/Write limitations not being applied

I used following command to test if the IOPS and Disk read/write limitations are being applied or not, but they are not. as soon as i run command, the disk uses 100% of IO and bandwidth. thought, i ...
0
votes
1answer
31 views

Are the following two iptables rules equivalent?

There are articles such as this which suggest something of the form of these iptables rules to block too many SSH connections made in a short time: -I INPUT -p tcp --dport 22 -i eth0 -m state --state ...
2
votes
1answer
421 views

Rate-limit nginx based on a prior request

It's not a problem, but I get a huge number of vulnerability scanners and script kiddies hitting my site, constantly. My site doesn't run WordPress, but it gets constantly scanned for WordPress ...
0
votes
1answer
325 views

How can I rate-limit requests sent by bots for a Nginx server?

There are many bots out there. Majestic bot is one of them. It sometimes crawls the website's pages by force, i.e. the server sometimes sends 100 requests during 1 second. Majestic bot is just an ...
0
votes
3answers
2k views

Postfix: limit INCOMING rate

I have a Postfix 2.11 server listed as an MX-server for a wildcard domain, *.domain.com I need to limit the incoming rate per particular subdomain/destination address. So if someone starts sending ...
0
votes
0answers
499 views

How to limit requests to specific locations?

I trying to limit requests count to specific url (login page) to deny some script-kiddies DOS-ers. And taking nothing. Here is my nginx config (some options i cut for readability): ...
0
votes
1answer
811 views

Why I can't limit bandwidth with tc command

I want to limit bandwidth for interface eth1, I read command in this link. sudo tc qdisc add dev eth1 root handle 1:0 htb default 10 sudo tc class add dev eth1 parent 1:0 classid 1:10 htb rate ...
2
votes
1answer
1k views

How to limit the maximum network speed in the whole Virtual Host?

Background I have a Apache (with NginX Reverse Proxy) as web server. I have a forum and a image host service running. But as you know, image host service causes a lot of network bandwidth (Mbps). I ...
0
votes
1answer
231 views

exim variable for domain

So i've been reading a lot about exim, however there are some variables which are showing an empty string on my server and therefore they are not working with my rate limit conditions. For instance I ...
0
votes
1answer
568 views

Download rate or Data Limitation on Mikrotik hotspot don't apply on users

I wonder to know has anyone had a problem of limitation on user in hotspot. (RB3011 - even tested on RB951G) After I config the hotspot and give permission to users based on the username and password ...
3
votes
1answer
3k views

HAProxy rate limiting - ban abuser for 30 minutes

I have the following config, that works OK for rate limiting connections. If an abuser is authenticated and he also accesses the defined regex location more than 30 times per minute, rate limiting is ...
0
votes
0answers
73 views

Gradual throttling total bandwidth

I have a server with a 30TB traffic allowance hosting (mostly) history images and would like to throttle one particular directory (the download image sizes) when necessary to avoid going over the ...
1
vote
1answer
445 views

Throttle incoming connections with iptables

I have a slightly self-inflicted DoS happening in some circumstances, and I'm trying to figure out if I can use iptables to help mitigate it. The short version is "How can I limit the rate of incoming ...