Skip to contentSkip to conversation

Empty Target

DISCUSSION Gilad Benjamini 3 participants 3 messages Feb 6, 2009 – Feb 7, 2009

lore
Share & tools
lore
#0 lore raw

I am trying to troubleshoot an iptables rule set, trying to understand where different packets are going. I have found that using "iptables -L -v" is a useful tool, with the counters telling me what's going on.
To "trigger" counters I currently use LOG rules. I would actually prefer some sort of empty rule; a rule that would do nothing beyond increasing the counters.

Does something like that exist ?
Seems trivial to implement.

#1 lore raw
Quoted 9 lines · Gilad Benjamini

I am trying to troubleshoot an iptables rule set, trying to understand where different packets are going. I have found that using "iptables -L -v" is a useful tool, with the counters telling me what's going on.
To "trigger" counters I currently use LOG rules. I would actually prefer some sort of empty rule; a rule that would do nothing beyond increasing the counters.

Does something like that exist ?
Seems trivial to implement.

Extremely trivial, and already there. There is no requirement that a rule must have a target. Just write the rule without one. I have several such rules in my ruleset.

Signature · 2 lines
Bob Nichols     "NOSPAM" is really part of my email address.
                Do NOT delete it.
#2 lore raw
In reply to Gilad Benjamini

OoO La nuit ayant déjà recouvert d'encre ce jour du vendredi 06 février 2009, vers 23:05, "Gilad Benjamini" <[email protected]> disait :

Quoted 9 lines

I am trying to troubleshoot an iptables rule set, trying to understand where different packets are going. I have found that using "iptables -L -v" is a useful tool, with the counters telling me what's going on.
To "trigger" counters I currently use LOG rules. I would actually prefer some sort of empty rule; a rule that would do nothing beyond increasing the counters.

Does something like that exist ?
Seems trivial to implement.

You can also use the TRACE target if your kernel is recent enough.

Signature · 4 lines
I WILL NOT GREASE THE MONKEY BARS
I WILL NOT GREASE THE MONKEY BARS
I WILL NOT GREASE THE MONKEY BARS
-+- Bart Simpson on chalkboard in episode 7F17