Is there a way to get wireshark to capture packets sent from/to localhost?

When I monitor traffic going from my computer to another, or from another computer to my computer, then it works. But from localhost to localhost does not register anything.

link|improve this question

what platform? Windows? Mac? Linux? – Jeff Atwood Jun 9 '09 at 22:51
Particularly on Windows – Brian R. Bondy Jun 9 '09 at 22:55
feedback

4 Answers

up vote 14 down vote accepted

There's a WIKI Entry about exactly this issue on the wireshark homepage.

They also mention specifics about the loopback interface regarding Windows - you could be running just into that.

link|improve this answer
Care to elaborate why this is getting voted down? – Server Horror Jun 9 '09 at 22:48
I did not vote down but probably because even basic questions that have easily findable solutions are encouraged on this site and stackoverflow.com. The answer is good but the tone is not. Consider editing it and I think it will be voted up. – Brian R. Bondy Jun 9 '09 at 22:53
I'm sorry I'm not a native english speaker (guess I'm not the only one). I'll try to think about that in the future. – Server Horror Jun 9 '09 at 22:55
+1 for knowing and adding the link. – l0c0b0x Jun 9 '09 at 23:00
@Server Horror: No prob, thanks for the info – Brian R. Bondy Jun 9 '09 at 23:02
show 1 more comment
feedback

In Wireshark you need to choose the lo0 interface... not En0 or En1.

Go to:

  • Show the capture options
  • Under "Interface" choose: lo0
  • Capture and you'll see a bunch of 127.0.0.1 communication
link|improve this answer
on windows, of course, i dont believe you can do that without somehow adding a loopback interface manually. – djangofan Apr 21 '10 at 22:02
feedback

You want to run wireshark on the "lo" interface or on "any".

With tshark or tcpdump you can use the -i option:

# tcpdump -i any port http

(This is mostly applicable to Linux)

link|improve this answer
feedback

This post was removed as the moderator didn't think it useful. There is however a way to do it without installing a loopback adapter.

link|improve this answer
I'm sorry - we don't do things like that on this site - if you have an answer to give please give it here, don't just link to your own site/product/service, it's considered spam and will be deleted and you could have your account suspended. – Chopper3 Mar 8 '11 at 17:58
Please remove my account. – Not used anymore Mar 13 '11 at 19:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.