I want each packet (that match iptables rule) to be delayed by some fixed time interval. How to to this?

Preudocode: iptables -A INPUT -p udp <more conditions> -j DELAY --delay 50000 # delay UDP packets for 50 milliseconds

Update: @related http://superuser.com/questions/147156/simulating-a-low-bandwidth-high-latency-network-connection-on-linux

link|improve this question

64% accept rate
Why? Testing purposes? – Shinrai Aug 9 '10 at 22:23
Yes, testing/debugging. Actually tc qdisc add dev eth1 root netem delay 250ms helped. – Vi. Aug 12 '10 at 9:51
feedback

1 Answer

up vote 1 down vote accepted

tc qdisc add dev eth1 root netem delay 250ms hack allows to do it globally for the given interface. It includes UDP packets.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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