Apache TCPMon

 

Install

Old Apache tcpmon-1.0

* Download tcpmon-1.0-bin.zip
* Unzip
* Check TCPMon Tutorial on how to use.

Newer codegoogle Release

* Download from here

Monitor HTTP Traffic

* For old release: double click build\tcpmon.bat to start or use command line:

 javaw.exe -cp ./tcpmon-1.0.jar org.apache.ws.commons.tcpmon.TCPMon

* For codegoogle release, use command line only:

java -cp tcpmon-1.1.jar com.codegoogle.tcpmon.MainWindow

* Under Admin tab
* Enter Listen Port #, e.g. 8888. This is the port TCPMon will be listening.
* Under Listener radio button, enter Target Hostname, e.g. yahoo.com. This is the target host you plan to invoke.
* Enter Target Port #, e.g. 80. This is the target port on the target host you plan to invoke.
* Click Add
– Now point to http://localhost:8888 and the traffic will go to yahoo.com and being monitored.

Monitor HTTPS Traffic

Since HTTPS traffic is encrypted by design, TCPMon alone is not enough for monitoring the web traffic. We need to couple it with another cool product called Stunnel in order to monitor the clear text traffic.

Install Stunnel

* Download Stunnel from Stunnel.org download site. I used Windows binaries version: stunnel-4.31-installer.exe
* Double click and install accordingly.

Configure Stunnel

Edit stunnel.conf to act as a HTTPS proxy to my.https.com site. Listening locally on an open port, e.g. 8080.

client=yes
verify=0
[my-https]
accept  = 8080
connect = my.https.com:443
TIMEOUTclose = 0

Start Stunnel

Point TCPMon to Stunnel

* Add a new TCPMon to listen on a different open port, e.g. 8181. Act as a listener for Stunnel, i.e. Target Hostname: localhost and Target Port #: 8080

Start Monitor HTTPS Traffic

* Point your browser to https://localhost:8181 and you should receive response content from https://my.https.com site.
* Clear text traffic can now be monitored with TCPMon.

This entry was posted in apache, soa. Bookmark the permalink.