I recently had an instance where I had to re-visit adding connection limits to a CPE running lots of connections. they were probably P2P. Here is the code we added:
/ip firewall filter add chain=forward action=log tcp-flags =syn protocol=tcp connection-limit=100,32 log-prefix="CONN_LIMIT:" comment="connection limit" disabled=no add chain=forward action=drop tcp-flags =syn protocol=tcp connection-limit=100,32 comment="connection limit" disabled=no
What this code does is this:
1.Limits the connections to 100 per IP. You can always adjust this for your case
2.Logs the connections & Drops them.
On a side note this customer was dragging down the ap with the amount of connections so we added these rules at the CPE level. It would have done little good to add it on the router.
If you enjoyed this post, make sure you subscribe to my RSS feed!

Social Links