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?


Use iptables-save or iptables-resotre with -c option to include bytes and counters.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.