0

I run iptables-save and backup my iptables rules in git. I recently noticed that 2 new tables popped up, mangle and nat, and I was not able to delete those tables. (perhaps an update to iptables added this).

I would like to understand why these tables' chains have ranges and what those ranges mean. i.e :PREROUTING ACCEPT [1344:400539]. I'm not sure what 1344:400539 indicate.

When I run iptables-save, i get the following output

*mangle
:PREROUTING ACCEPT [1344:400539]
:INPUT ACCEPT [1344:400539]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [986:220524]
:POSTROUTING ACCEPT [986:220524]
COMMIT
3

From https://git.netfilter.org/iptables/tree/iptables/iptables-save.c?id=d89dc47ab3875f6fe6679cebceccd2000bf81b8e#n95 you can see that those are the packet and byte-counts that have matched those chains, respectively.

printf("[%llu:%llu]\n", (unsigned long long)count.pcnt, (unsigned long long)count.bcnt);

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.