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
23 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
49 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 ...
0
votes
0answers
21 views

Nginx: Rate limiting by HTTP method

I would like to set limit rate on specific endpoint by HTTP method. My current configuration limites all http method: limit_req_zone $binary_remote_addr zone=api:10m rate=60r/m; location ~ /v3/...
1
vote
0answers
22 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
0answers
16 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
11 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
21 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
78 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
34 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
142 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
118 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
49 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
102 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
254 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
65 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
50 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
326 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
103 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
953 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
180 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
38 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
265 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
404 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
520 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
428 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
389 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
459 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
606 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
401 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
409 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
304 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
451 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
713 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
216 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
538 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
67 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
420 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 ...
2
votes
2answers
7k views

Postfix limit total sent per hour

I'm not after services that could provide me with fancy fine-grained control like policyd, I don't need per user/domain control, I only want to: limit maximim number of emails that could be sent ...
0
votes
1answer
126 views

Simultaneous outgoing connections limit with iptables not working

I run a website that technically acts as a proxy to another website (I make HTTP requests to it), and I needed to make sure not too many simultaneous connections were made, I thus limited it to 29 ...
1
vote
1answer
2k views

Rate Limit VLAN interface | Cisco Nexus

How to do QoS in cisco nexus for Rate limit. In cisco Routers , we will be creating a policy map and calling it in service_policy in VLAN Interface Ex: Policy-map Policy_2Mbps class class-default ...
2
votes
1answer
7k views

How to do traffic shaping (rate limiting) with TC per OpenVPN client

This question is related to another question with a great answer and script from @Oliver. The goal: I want to modify/extend the script provided in this answer to suit my requirements, which are as ...
1
vote
0answers
175 views

HTB scheduler unexpected behaviour, low priority traffic starving high priority traffic

I am working on assuring low delay for UDP traffic at the home gateway level. At this home gateway I have two types of traffic, TCP and UDP, and I assure differentiated treatment by using HTB. The ...