Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to clone incoming UDP packets onto a different host, I found a way to do it Here but I could not build xtables-addons on centos 5.3 .

Is there any other way to tee upd packets?

share|improve this question
I'm not clear. Do you want to actually "tee" them or do you just redirect them to another host? – Evan Anderson Sep 10 '10 at 17:59
up vote 4 down vote accepted


iptables -A PREROUTING -t mangle -p udp --dport 7 -j ROUTE --gw --tee
iptables -A POSTROUTING -t mangle -p udp --sport 7 -j ROUTE --gw --tee
share|improve this answer

We're using a 3.2.0 kernel on an Ubuntu 12.04, and this iptables rule did the trick (no need to patch!):

sudo iptables -t mangle -A PREROUTING  -p udp --dport 60000 -j TEE --gateway

This will copy the incoming packets to UDP port 60000 to the IP set in --gateway. Take in account that the gateway should be in the same network, if don't , the rule won't work unless you do something similar in the router between networks.

I wonder if there's a way to traverse this network flow to another network, maybe NATing, but we haven't tested it yet.

share|improve this answer

I just found samplicator which also seems to do this.

share|improve this answer
Careful with posting this link multiple times, it is setting off the spam filter alerts. – Mark Henderson Jun 26 '15 at 4:27

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.