Mon Sep 19, 2016 6:51 pm
Different packets in a connection will usually match different rules if you're using connection tracking.
Consider this list of rules in the forward chain:
1: fast-track connection-state=established,related
2: accept connection-state=established,related
3: accept in-interface=lan
4: accept protocol=tcp port=22
5: drop
The first packet of a new incoming ssh connection will not match rule 1 or rule 2 because it is in the "new" state.
This packet will be counted on rule 4's counters.
The first reply packet from the internal server will place the connection into the "established" state, and the packet will match rule 1, bumping that rule's counter by one packet and by however much data the packet's size is....
Then the "ACK" packet (completing the TCP 3-way handshake) will arrive at the router, but since the connection was fast-tracked, it will not be compared to the firewall rules anymore - all packets in this connection (incoming AND outgoing) will be added to the dummy rule's counters.
If you take fast track out of the mix, (say you disabled rule 1) then rule 2 would be getting the packet counts and byte counts - but it will get ALL traffic in BOTH directions on ALL established,related connections.
In general, a firewall like this will have the behavior that the counters on the rules which allow certain types of new connections will reflect the number of connection attempts made because each new connection will fall through to that rule, while all subsequent packets will get caught by the performance-enhancing rule which immediately accepts (or fast tracks) all established connections.
(EDIT: the above is kinda complicated. Put more simply: For each rule that allows/drops certain ports... each rule basically becomes a counter for "connection attempts" on that port.)
The documentation's wording is what you should litterally consider the rule counters to mean - they tell you exactly how many packets have matched that rule, and how many bytes of data those packets represent in total. I hope that my elaboration here has helped you understand why this is not necessarily the same thing as the amount of traffic that flows through the router.