TCP trace listening Tool

Source: Internet
Author: User

Some unknown problems may be related to network communication. Generally, httpwatch is used to check the specific situation, but httpwatch cannot be used in some places, for example:

  • The server sends a request to another server and does not know whether the request is correct or not;
  • Is the soap service correct?

In order to diagnose the problem, the information needs to be transparent, so with the help of a third-party interception tool similar to a proxy, such tools listen to the specified port, the received information is transferred to the specified server specified port, there are two commonly used:

1. TCP trace running on Windows

Tool: tcptrace.exe

The principle of the transit tool is as follows:

  • On the host 192.168.1.186, you can directly access the test web application on port 8080 of host 192.168.1.88 and run dataexchange.
  • To understand the communication between the two parties, a tool similar to a proxy is added between the two parties, so that 186 of requests sent to 88 are directly sent to the tool and then transferred to 88 servers by the tool;
  • Assuming that a tool is deployed on port 186, the tool sets the listening port to port 86 and forwards port 8080 of the target 88.

You need to set TCP trace as follows:

 

  • In dataexchange, you need to change the test address from 192.168.1.11: 8080 to 192.168.1.11: 86, then run test
    Requests sent from web applications are first forwarded to the 100.88 server through the tcptrace tool.
  • Or enter http: // 192.168.1.186: 86/test/anywhere, which is equivalent to accessing test on 100.88.
2. Java-only TCP trace, which can run in Linux

When the user does not have a Windows machine, need to use this version of the tool, click the link to download: TCPTrace-Java.rar

On Linux, modify start. sh parameter. The first parameter is the listening port, the second parameter is the target IP address, the third parameter is the port of the target IP address, and the fourth parameter is the encoding of the forwarding request.

Modify the parameters in start. Sh in windows.

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.