1

iptables can limit connections per ip at the same time with the --connlimit command .
but I want to know is there a way to limit connected IPs at the same time?
for example, if you limit connections to 30, then multiple IPs can connect to port, but any IP can create max 30 connections, but I want to create a rule that limits IPs, not every IP connections. for example, I want to set a rule that only 2 IPs can connect to the port at the same time with unlimited connections.

A H
  • 11
  • 2
  • Sorry it is unclear what is the difference between "limit connections per ip in seccond" and "to limit connected IPs per seccond". Please elaborate the question more. – Nikita Kipriyanov Nov 03 '22 at 07:58
  • for example, if you limit connections to 30T multiple IPs can connect to port but any IP can create max 30 connections per second, but I want to create a rule that limit IPs, not every IP connections. for example, I want to set a rule that only 2 IPs can connect to the port at the same time with unlimited connections. I hope I made my meaning clear – A H Nov 04 '22 at 16:41
  • Actually connlimit limits the absolute number of connections, without notion of speed. The question talks about speed ("per second"), but your last comment doesn't appear to require handling of any speed. So the premise in the question needs reworking and examples should be added (in the question, not in comments). – A.B Nov 05 '22 at 12:06

0 Answers0