Is there a way to see when iptables was last changed?

I'm running CentOS5. I found this morning that the configuration is different from what I set 6 months ago.

1 Answer 1


I don't know if there is a way, but I use a custom chain to setup the iptables activation date, like so:

DATE_AND_TIME=`date +"%d-%m-%y_%H-%M-%S"`

Note: I have started the custom chain with x to be the last chain.

To print the last activation date:

iptables -L -n -v | grep X_DATE

It will print something like:

Chain X_DATE_13-02-14_11-36-05 (0 references)

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.