I searched and I can't find a rule to limit the count of the incoming packets for a INPUT UDP port per second and per IP.
I need that per all IPs that connect to my socket, not for a specific one.
I'm using iptables on Ubuntu 14.0.4 LTS amd64.
I am familiar how UDP works. In my scenario someone can create great number of UDP sockets using different ports.
I need only one socket from a single IP can connect to my UDP port.
Is this possible with iptables? I know Netfilter and C++, can i do this with that?
Best Answer
Here is what you can do:
You need to have limit iptables extension. The example provided limits maximum 25 connection per minute. The
limit-burst 100
indicates that the limit/minute will be enforced only after the total number of connection have reached the limit-burst level.From the manual: