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 am testing the timeout handling for an outbound CURL in a PHP app I am developing after an outage at an affiliate brought down my site. I am looking for a way to intentionally slowdown or permanently stall outbound connections to a specific IP address so I can tune my timeout schema. Is there any way to do this?

share|improve this question

migrated from Jul 14 '11 at 2:00

This question came from our site for professional and enthusiast programmers.

The Charles proxy server can do connection throttling, e.g. artificially increasing the latency or limiting the bandwidth. Install it and use the cURL CURLOPT_PROXY option to point PHP to the proxy server.

share|improve this answer

The linux traffic shaper, although normally used to enforce QoS, is also perfect to degrade connections arbitrarily.

share|improve this answer

To completely block traffic you could do an iptables drop command for the outbound traffic to that dst address.


iptables -A OUTPUT --dst -j DROP
share|improve this answer

Your Answer


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