{"id":195,"date":"2009-01-13T15:01:01","date_gmt":"2009-01-13T19:01:01","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=195"},"modified":"2013-03-22T14:09:38","modified_gmt":"2013-03-22T19:09:38","slug":"apache-tcpmon","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=195","title":{"rendered":"Apache TCPMon"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Install\">Install<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Old_Apache_tcpmon-1.0\">Old Apache tcpmon-1.0<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Newer_codegoogle_Release\">Newer codegoogle Release<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Monitor_HTTP_Traffic\">Monitor HTTP Traffic<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Monitor_HTTPS_Traffic\">Monitor HTTPS Traffic<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Install_Stunnel\">Install Stunnel<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Configure_Stunnel\">Configure Stunnel<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Start_Stunnel\">Start Stunnel<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Point_TCPMon_to_Stunnel\">Point TCPMon to Stunnel<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Start_Monitor_HTTPS_Traffic\">Start Monitor HTTPS Traffic<\/a>\n\t\t\t<\/li>\n<\/ol>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Install\"><h2>Install<\/h2><\/span>\n<span id=\"Old_Apache_tcpmon-1.0\"><h3>Old Apache tcpmon-1.0<\/h3><\/span>\n<p>* Download tcpmon-1.0-bin.zip<br \/>\n* Unzip<br \/>\n* Check TCPMon Tutorial on how to use.<\/p>\n<span id=\"Newer_codegoogle_Release\"><h3>Newer codegoogle Release<\/h3><\/span>\n<p>* Download from <a href=\"http:\/\/code.google.com\/p\/tcpmon\/\">here<\/a><\/p>\n<span id=\"Monitor_HTTP_Traffic\"><h2>Monitor HTTP Traffic<\/h2><\/span>\n<p>* For old release: double click <em>build\\tcpmon.bat<\/em> to start or use command line:<\/p>\n<pre lang=\"dos\">\r\n javaw.exe -cp .\/tcpmon-1.0.jar org.apache.ws.commons.tcpmon.TCPMon\r\n<\/pre>\n<p>* For codegoogle release, use command line only:<\/p>\n<pre lang=\"java\">\r\njava -cp tcpmon-1.1.jar com.codegoogle.tcpmon.MainWindow\r\n<\/pre>\n<p>* Under Admin tab<br \/>\n* Enter Listen Port #, e.g. <strong>8888<\/strong>. This is the port TCPMon will be listening.<br \/>\n* Under Listener radio button, enter Target Hostname, e.g. yahoo.com. This is the target host you plan to invoke.<br \/>\n* Enter Target Port #, e.g. 80. This is the target port on the target host you plan to invoke.<br \/>\n* Click Add<br \/>\n&#8211; Now point to <a href=\"http:\/\/localhost:8888\">http:\/\/localhost:8888<\/a> and the traffic will go to yahoo.com and being monitored.<\/p>\n<span id=\"Monitor_HTTPS_Traffic\"><h2>Monitor HTTPS Traffic<\/h2><\/span>\n<p>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 <em>Stunnel<\/em> in order to monitor the clear text traffic.<\/p>\n<span id=\"Install_Stunnel\"><h3>Install Stunnel<\/h3><\/span>\n<p>* Download Stunnel from <a href=\"http:\/\/www.stunnel.org\/download\/\">Stunnel.org download site<\/a>. I used Windows binaries version: <a href=\"http:\/\/www.stunnel.org\/download\/stunnel\/win32\/stunnel-4.31-installer.exe\">stunnel-4.31-installer.exe<\/a><br \/>\n* Double click and install accordingly.<\/p>\n<span id=\"Configure_Stunnel\"><h3>Configure Stunnel<\/h3><\/span>\n<p>Edit <em>stunnel.conf<\/em> to act as a HTTPS proxy to my.https.com site. Listening locally on an open port, e.g. 8080.<\/p>\n<pre lang=\"dos\">\r\nclient=yes\r\nverify=0\r\n[my-https]\r\naccept  = 8080\r\nconnect = my.https.com:443\r\nTIMEOUTclose = 0\r\n<\/pre>\n<span id=\"Start_Stunnel\"><h3>Start Stunnel<\/h3><\/span>\n<span id=\"Point_TCPMon_to_Stunnel\"><h3>Point TCPMon to Stunnel<\/h3><\/span>\n<p>* Add a new TCPMon to listen on a different open port, e.g. 8181. Act as a listener for Stunnel, i.e. Target Hostname: <strong>localhost<\/strong> and Target Port #: <strong>8080<\/strong><\/p>\n<span id=\"Start_Monitor_HTTPS_Traffic\"><h3>Start Monitor HTTPS Traffic<\/h3><\/span>\n<p>* Point your browser to https:\/\/localhost:8181 and you should receive response content from https:\/\/my.https.com site.<br \/>\n* Clear text traffic can now be monitored with TCPMon.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=195\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[21,22],"tags":[],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-apache","category-soa"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-39","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=195"}],"version-history":[{"count":12,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":1450,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/195\/revisions\/1450"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}