TC-XT(8)
โจ xt โ tc iptables action โจ
okay bestie, pull up a chair because we're talking about the xt action from the iptables action in tc(8) manual ๐
yes that's the whole name, she's long but she's iconic.
๐ธ NAME ๐ธ
xt โ the tc iptables action ๐ฆ
๐ SYNOPSIS ๐
tc ... action xt -j TARGET [ TARGET_OPTS ]
๐ DESCRIPTION ๐
okay so here's the tea: the xt action is your little backstage pass ๐๏ธ it lets you call arbitrary iptables targets for the packets that match the filter this action is attached to. that's it, that's the whole vibe. match a filter โ jump into iptables target land. no cap. ๐ฅ
โจ OPTIONS โจ
-j TARGET [ TARGET_OPTS ]โ do a lil jump into the iptables target you name inTARGET, and if you want you can also pass along any target-specific options inTARGET_OPTS. literally just "hey kernel, go here, and take these with you" ๐ซถ
๐ EXAMPLES ๐
okay this one is genuinely so fun. the following will attach a u32 filter to the ingress qdisc, matching ICMP replies, and then use the xt action to make the kernel yell 'PONG' every single time ๐ญ๐ it's giving ping-pong but the kernel is the one talking back.
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: proto ip u32 \
match ip protocol 1 0xff \
match ip icmp_type 0 0xff \
action xt -j LOG --log-prefix PONG
obsessed with her honestly ๐
๐ SEE ALSO ๐
tc(8), tc-u32(8), iptables-extensions(8) โ go read these too, bestie, they're the supporting cast ๐
that's a wrap, babe ๐
this page came from the iproute2 girlies, dated 3 Mar 2016, and it lives in the iptables action in tc(8) section of the manual. periodt. โจ๐๐
๐ฆ where this page comes from
- debian bookworm: iproute2 6.1.0-3 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6.4 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms