Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
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

1 Answer 1

up vote 3 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.

share|improve this answer

Your Answer

 
discard

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.