Play tcpcopy+ Intercept+mysql-replay-module (unsuccessful)

Source: Internet
Author: User
Tags git clone

tcpcopy+ intercept These two analog traffic forwarding is simple.

However, when you want to implement a mysql-replay-module module, it fails. (I think about it now, it's not practical in our present scenario, but it's better to be professional.) )

Https://github.com/session-replay-tools/mysql-replay-module

Https://github.com/session-replay-tools/tcpcopy

Installing =================================

One, install intercept on the assistant server:

    1. git clone git://github.com/session-replay-tools/intercept.git
    2. CD Intercept
    3. ./configure--with-resp-payload
    4. Make
    5. Make install

Two, install tcpcopy on the online server:

    1. git clone git://github.com/session-replay-tools/tcpcopy.git
    2. CD tcpcopy
    3. git clone git://github.com/session-replay-tools/mysql-replay-module.git
    4. ./configure--set-protocol-module=mysql-replay-module
    5. Make
    6. Make install

Configure ====================================

One, configure the route on target server:

    For example:       Assume 10.110.12.18 is the IP address of the assistant server and     10.110.12.15 is the MySQL client IP address. We set the following route     command to route all responses to the 10.110.12.15 to the assistant server.       route add -host 10.110.12.15 gw 10.110.12.18

Two, configure port filtering on the assistant server:

  For example:      ./intercept -i eth0 -F ‘tcp and src port 3306‘ -d      intercept will capture response packets of the TCP based application which   

Three, start tcpcopy on the online server:

a) set user password pair in conf/plugin.conf in the installion directory    Format:       user [email protected],[email protected],...,[email protected];    For example:       user [email protected];      b) start tcpcopy    ./tcpcopy -x localServerPort-targetServerIP:targetServerPort -s <intercept server,>     For example(assume 10.110.12.17 is the IP address of the target server):      ./tcpcopy -x 3306-10.110.12.17:3306 -s 10.110.12.18       tcpcopy would capture MySQL packets(assume MySQL listens on 3306 port) on current   server, do the necessary modifications and send these packets to the target port   ‘3306‘ on ‘10.110.12.17‘(the target MySQL), and connect 10.110.12.18 for asking   intercept to pass response packets to it.


最后,一份转两份,真实服务器上有,测试服务器上也有流量。用过压力或冒烟测试,蛮好的。


Play tcpcopy+ Intercept+mysql-replay-module (unsuccessful)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.