Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to copy every outgoing packet to others WAN interfaces but my iptables (v1.2.7) has not TEE target support. I wonder if there is another way (maybe using iproute2 or ebtables) to copy every outgoing packet to an selected interface. I prefer other way than getting xtables-addons because im working with a embedded device (an UClinux distribution) and i would prefer avoid new versions of iptables (I dont know if the syntax remains the same among versions), cross-compiling problems or changing Makefiles.

share|improve this question

2 Answers 2

The ROUTE target from patch-o-matic should compile against your kernel and for the 1.2.7 version of iptables and has a --tee target option which should do what you want. This being said, iptables 1.2.7 is over 11 (!!) years old now, probably so is your kernel version. You really should consider using a more recent piece of code - a lot has changed in the meantime.

There also is the libpcap-based port-mirroring project originally started for the uClibc-backed OpenWRT. It might compile against your platform as well.

Another possible option is the mirred action to tc - but given the date of your codebase I doubt that it would be included out-of-the box, so it would be compiling Kernel modules again.

share|improve this answer
And OpenWRT, at least, has a reasonably modern kernel and userland, unlike whatever this ancient device is... – Michael Hampton Jul 10 '13 at 19:17
Hi, if there is a different solution i would prefer because i dont want to update iptables or kernel in my firmware project with autotools, it may broke currently development. I consider using port-mirroring project but i want I want to copy every outgoing packet (packet wiht ip destination out of LAN) not only one+ selected interfaces. – user2119381 Jul 11 '13 at 11:08
@user2119381 there is the netfilter / Kernel module approach or libpcap - choose your own adventure. Libpcap is expected to be a bit of a strain on your resources, but would not need kernel-level adjustments. – the-wabbit Jul 11 '13 at 11:23

In case the "TEE" target is not working, you can install a third party "port mirroring" program.

It's based on libpcap:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.