Duplicate incoming TCP traffic on Debian Squeeze
- by Erwan Queffélec
I have to test a homebrew server that accepts a lot of incoming TCP traffic on a single port. The protocol is homebrew as well.
For testing purposes, I'd like to send this traffic both :
- to the production server (say, listening on port 12345)
- to the test server (say, listening on port 23456)
My clients apps are "dumb" : they never read data back, and the server never replies anyway, my server only accepts connections, and do statistical computations and store/forward/service both raw and computed data.
Actually, client apps and hardware are so simple there is no way I can tell clients to send their stream on both servers... And using "fake" clients is not good enough.
What could be the simplest solution ? I can of course write an intermediary app that just copy incoming data and send it back to the testing server, pretending to be the client.
I have a single server running Squeeze and have total control over it.
Thanks in advance for your replies.