tcpcopy命令 [1]





1. Assume is the IP address of the assistant server

On the target server which runs server applications:

//Assume is the IP address of the assistant server. We set the
//following route command to route all responses to the 62.135.200.x's clients
//to the assistant server.

route add -net netmask gw

On the assistant server which runs intercept(root privilege is required):

./intercept -F <filter> -i <device,>
// intercept will capture response packets of the TCP based application which listens
// on port 8080 from device eth0
./intercept -i eth0 -F 'tcp and src port 8080' -d

On the online source server (root privilege is required):

./tcpcopy -x localServerPort-targetServerIP:targetServerPort -s <intercept server,> [-c <ip range,>]
//tcpcopy would capture port '80' packets on current server, change client IP address
//to one of 62.135.200.x series, send these packets to the target port '8080' of the
//target server '', and connect for asking intercept to
//pass response packets to it.
./tcpcopy -x 80- -s -c 62.135.200.x