Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 11 down vote accepted

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

share|improve this answer
    
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

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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