I have a connlimit rule in iptables that allow only 5 connection to port 80.
iptables -A FORWARD -p tcp -m tcp --syn --dport 80 -m connlimit --connlimit-above 5 --connlimit-saddr -j DROP
This rule works fine till I restore iptables. After restore rules, connlimit counters start over and clients/attackers can open 5 more connection.
Is it possible to avoid this situation?