9

When are iptables byte counters reset? On reboot or other rotation?

17

On reboot, or whenever you ask them to be cleared with the -Z option to iptables.

  • 3
    Also if the entry is changed in any way, iptables -R INPUT 5 -j LOG ... line 5's counters will be reset so as to properly reflect that it is a counter of what matches the function of the line. – mikebabcock Mar 7 '12 at 15:02
5

On reboot, when -Z is called or when a table is flushed (-F). Counters are also reset if you run "/etc/init.d/iptables stop" on RHEL or CentOS (because it flushes all default chains).

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.