7

I am using Wireshark on Windows Vista and I would like to capture http traffic to localhost (127.0.0.1), for debugging purposes, but I have some questions.

  • How can I do this?
  • What capture interface should I use?
    • If I use my NIC as capture interface, only packets to and from the internet are captured.
  • Are there any settings in Wireshark to capture packets going to and from localhost?
HopelessN00b
  • 1,882
  • 3
  • 21
  • 29
Jonas
  • 26,874
  • 52
  • 105
  • 125

3 Answers3

7

The short answer is, on Windows you can't. The Wireshark Wiki describes a couple of workarounds, such as installing a virtual network card using the Microsoft Loopback Adapter, however the results are less than optimal. Their suggestion of setting up a new route will give you all of your data twice, and could put unnecessary load on your network if left enabled, but you should get the data.

heavyd
  • 62,847
  • 18
  • 155
  • 177
  • This was true in 2010, but Wireshark has shipped with Npcap for a while now and can capture loopback traffic just fine. – Gerald Combs Jan 23 '23 at 17:39
3

For anyone reading this in 2019 or later, Wireshark 3.0 ships with Npcap, which allows loopback capture.

Gerald Combs
  • 303
  • 1
  • 5
2

If you capture on the local loopback interface (called lo0 on my machine), that will show you the traffic between localhost and itself. The loopback is where localhost traffic goes when it doesn't have to go through the NIC interface.

Steve Nay
  • 255
  • 3
  • 8