On Apr 12, 2011, at 1:47 PM, Andrew McNabb wrote:

> On Tue, Apr 12, 2011 at 01:36:01PM -0600, Levi Pearson wrote:
> 
> I agree with Levi's statement.  Dave, is there a way to get around
> having root access that I haven't thought about?  The only thing that I
> could think of would be using a network simulator like ns or omnet, but
> I think network simulation would pair poorly with what you're trying to
> accomplish.
> 

Yes. I'm proposing a user-land executable (like socat) that listens for 
connections on localhost, say, port 8000, and forwards the data received to a 
user-specified remote host/port (like ssh -L, minus the 
encryption/authentication), and does user-configurable naughty things to the 
bits while in transit. My primary use case is dropping all data after N bytes 
are transferred to simulate an otherwise undetectable network outage. I intend 
to put this to work in our continuous integration test suite so our software is 
constantly getting validated against unfavorable network conditions (we already 
do testing against DNS timeouts, unresponsive hosts, and other stuff that's 
easier to simulate with quick hacks to /etc/resolv.conf and /etc/hosts).

Peter McNabb actually showed me some ways that iptables can do what I want with 
its statistics module (connbytes and TARPIT), which when used in conjunction 
with tc, would be pretty cool.

Clearly, methods exist to do what I want, but it looks like all of them involve 
pulling together multiple tools. Wouldn't it be great to do this with a single 
executable and a simple command line interface?

Must. Resist. Temptation. To. Reinvent. Wheel... ("but my wheel would be so 
much shinier!" quoth the village software idiot)

--Dave

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to