Monitor TCP transactions with TCPMon

If you have done any work with web services (especially SOAP) you will appreciate the value of a good TCP monitoring tool. Wireshark is arguably the best network monitoring tool available, but it is complicated and for monitoring plain old HTTP transactions is akin to hitting the proverbial nut with a sledgehammer. Fortunately Apache have TCPMon, a light-weight, Java-based TCP monitoring utility that lets you quickly see what TCP transactions are taking place between your computer and a server (be it local or remote).

TCPMon does not need to be installed, just download the latest version and execute the relevant startup script (.bat for Windows, .sh for OSX/Linux). There are very few options, but to monitor TCP traffic between your client and a server set the listen port to the local port you will be sending requests to and the target hostname/port to where you want the requests sent:

For example if you wanted to track TCP traffic between my browser and google.co.nz enter www.google.co.nz as the target hostname and port 80 as the target port. Then point your client (i.e. browser) to http://localhost:8888 (where 8888 is the listening port). TCPMon will take your inbound TCP request, forward it on to http://www.google.com:80 and record what gets returned. Whilst all this takes place you can sit back and inspect the TCP transactions. Okay completely useless to normal people, but for anyone that has had to debug a SOAP request quite invaluable.