I want to monitor all HTTP traffic to one of my localhost websites that I am run
ID: 660291 • Letter: I
Question
I want to monitor all HTTP traffic to one of my localhost websites that I am running in the Visual Studio debugger, which hosts the website on IIS Express, while my debugging session is in progress.
I've been using Fiddler for many years now, along with developer tools on most popular browsers. However, all these are proxies for browsers. They do not capture activity between a different type of client other than a browser and a website. For e.g. if I have a .NET MVC application sending an HTTP request using the System.Net.HttpClient class to a ASP.NET Web API, both hosted on the same computer, Fiddler does not capture that traffic, and for obvious reasons, neither do any of the browsers because they are not involved in that request.
I want to capture all HTTP traffic (requests and responses) from any kind of a client to one of my websites hosted on localhost.
Can I do something to make Fiddler do that? Alternatively, is there a free tool that'll help me do that?
Explanation / Answer
There's a good blog post located here that describes using netcat, wireshark, and PowerShell scripts to forward localhost traffic to your default gateway and back.
An apparent caveat is that it may cause you to see double traffic (outbound and inbound). The solution is to change your capture filter accordingly.
If I were capturing on my local system, I'd go with
http and ip.src==192.168.1.2
(but obviously using your computer's IP). That would show only the HTTP packets leaving your computer. That should reduce the number of packets as opposed to capturing them on the return (dst.ip) which would also show any websites you were browsing.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.