This question already has an answer here:

I'm building a network emulator to help realize different speeds. Basically, this system would shape a given user's network metrics (such as upload speed/download speeds/packet loss/jitter etc) based on the user's request. For instance, if a user selected 3G, the system would transform his/her connection to behave like a 3G connection. I imagine doing this by using the user's IP address.

I have been searching for some help on this but couldn't find a lot. I wonder if this is feasible at all.

marked as duplicate by yoonix, mdpc, Jenny D, voretaq7 Mar 19 '15 at 17:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You can simulate the drop packages using something like this:

iptables -A OUTPUT -p tcp -d [your station ip] --sport 80 -m statistic --mode random --probability 0.2 -j DROP

Translate to: the server will drop with a probability of 20 percent packets going to your station.

For more advanced options take a look at this.

  • Can we do this differently for each user? I would like to set a different package drop for each user. – newserverguy Mar 19 '15 at 16:21

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