Tuesday, March 9, 2021

How to block connections past a certain number per port on Linux server using IPTABLES?

Hello guys!

First post here. We are looking for a way to limit a specific port on our linux server to X amount of connections and block all connections past this number.

We have tried limiting the port to a certain number but it is only applied per source IP and not globally across the server. So clients are able to use multiple machines and effectively bypass this limit. Essentially we dont want this port to be reached more than 400 connections per port. Each client will have its own port. So one client cannot access more than 400 connections.

Is there a way in IPTABLES to apply a hard limit per port number bypassing the per source IP?

Thank you



No comments:

Post a Comment