Comment 9 for bug 1163290

Revision history for this message
wangbin579 (wangbin579) wrote :

We have fixed the above problem in version 0.7.0 .

https://github.com/wangbin579/tcpcopy

Run:
       a) on the target host (root privilege is required):

          using ip queue (kernel < 3.5):
            modprobe ip_queue # if not running
            iptables -I OUTPUT -p tcp --sport port -j QUEUE # if not set
            ./intercept

          or

          using nfqueue (kernel >= 3.5):
            iptables -I OUTPUT -p tcp --sport port -j NFQUEUE # if not set
            ./intercept

       b) on the source host (root privilege is required):
          sudo ./tcpcopy -x localServerPort-targetServerIP:targetServerPort

If the kernel version is v3.5.0 or above, tcpcopy 0.7.0 will automatically use nfqueue instead of ip queue, and
"-j QUEUE" in the iptables command should be changed to "-j NFQUEUE"