Why doesn't wireshark detect my interface?
Asked Answered
C

8

47

I just installed Wireshark, but when I click capture > interfaces, the dialog box appears, but it does not contain my network interface.

When click on capture > interfaces it appears as in the screenshot below. What can cause this?

no interfaces listed

Cantor answered 24/11, 2011 at 10:35 Comment(2)
Have you libpcap installed and running?Gorilla
I used this with sudo, Then it worked fine.Cantor
T
48

This is usually caused by incorrectly setting up permissions related to running Wireshark correctly. While you can avoid this issue by running Wireshark with elevated privileges (e.g. with sudo), it should generally be avoided (see here, specifically here). This sometimes results from an incomplete or partially successful installation of Wireshark. Since you are running Ubuntu, this can be resolved by following the instructions given in this answer on the Wireshark Q&A site. In summary, after installing Wireshark, execute the following commands:

sudo dpkg-reconfigure wireshark-common 
sudo usermod -a -G wireshark $USER

Then log out and log back in (or reboot), and Wireshark should work correctly without needing additional privileges. Finally, if the problem is still not resolved, it may be that dumpcap was not correctly configured, or there is something else preventing it from operating correctly. In this case, you can set the setuid bit for dumpcap so that it always runs as root.

sudo chmod 4711 `which dumpcap`

One some distros you might get the following error when you execute the command above:

chmod: missing operand after ‘4711’

Try 'chmod --help' for more information.

In this case try running

sudo chmod 4711 `sudo which dumpcap`
Tiffanietiffanle answered 13/1, 2012 at 19:18 Comment(5)
+1 for using which dumpcap. I was convinced that I had done everything right, but Wireshark was trying to use /usr/local/bin/dumpcap when I had set up the permissions for /usr/bin/dumpcap.Immensurable
"Running as administrator" in windowsKeown
Thank you so much. That part with the chmod 4711 was missing on fedora, too. Though you need to run the which command as sudo, too: sudo chmod 4711 sudo which dumpcapPapa
@Papa The sudo which dumpcap solved the problem.Basrhin
This works. I have to ask how come that for years now Wireshark has this configuration step that comes during the installation, where it asks you whether non-root users should be able to capture data on interfaces yet it hasn't worked a single time for me. I always need to go through the dpkg-reconfiguration step and so on.Basrhin
H
33

In Windows, with Wireshark 2.0.4, running as Administrator did not solve this for me. What did was restarting the NetGroup Packet Filter Driver (npf) service:

  1. Open a Command Prompt with administrative privileges.
  2. Execute the command sc query npf and verify if the service is running.
  3. Execute the command sc stop npf followed by the command sc start npf.
  4. Open WireShark and press F5.

Source: http://dynamic-datacenter.be/?p=1279

Haas answered 22/7, 2016 at 23:57 Comment(4)
I had to close all running copies of Wireshark before the sc stop npf command would finish. Thanks though - this worked for me on Win7!Palindrome
Thanks - had to do this myself. The service wouldn't stop though until i exited Wireshark. After that, it all worked fine.Bibliographer
In case anyone else is as dumb as me...I had this issue, and running the commands above resulted in: The specified service does not exist as an installed service. Turns out it was just that I had unchecked the "Install WinPacp" checkbox during the WireShark install, thinking it was an unnecessary addition without reviewing any of the information. Most importantly the note: "WinPcap is required to capture live network data".Vansickle
Or, as was my case, you're running Wireshark Portable, which does not install WinPcap by default :-| You either install it, or manually save/convert captures to a file and then feed them to Wireshark, see here.Aleppo
G
4

As described in other answer, it's usually caused by incorrectly setting up permissions related to running Wireshark correctly.

Windows machines:

Run Wireshark as administrator.

Wireshark in Administrator privileges.

Gittens answered 12/3, 2016 at 7:35 Comment(3)
No you should not do that, and it’s not necessary.Hexastich
@kissaki Does this generally go for windows programs? Or maybe a more specific question: What aspects of a program makes it vulnerable if it is run with admin rights?Silverplate
@RnBandCrunk Running a program as administrator gives the program access to do whatever it wants to do across all users and groups, including the administrator. It effectively gives the program root privilege. If the program was written poorly or maliciously or used a library written as such, it could do some less than pleasant things to your computer. Why even give it the chance, unless absolutely necessary?Garay
L
4

For *nix OSes, run wireshark with sudo privileges. You need to be superuser in order to be able to view interfaces. Just like running tcpdump -D vs sudo tcpdump -D, the first one won't show any of the interfaces, won't compalain/prompt for sudo privileges either.

So, from terminal, run:

$ sudo wireshark
Labialized answered 19/8, 2018 at 3:18 Comment(0)
F
2

By Restarting NPF, I can see the interfaces with wireshark 1.6.5

Open a Command Prompt with administrative privileges.

  1. Execute the command "sc stop npf".
  2. Then start npf by command "sc start npf".
  3. Open WireShark.

That's it.

Fireguard answered 20/4, 2018 at 9:5 Comment(0)
D
0

On Fedora 29 with Wireshark 3.0.0 only adding a user to the wireshark group is required:

sudo usermod -a -G wireshark $USER

Then log out and log back in (or reboot), and Wireshark should work correctly.

Debera answered 28/3, 2019 at 9:40 Comment(0)
C
0

I hit the same problem on my laptop(win 10) with Wireshark(version 3.2.0), and I tried all the above solutions but unfortunately don't help.

So,

I uninstall the Wireshark bluntly and reinstall it.

After that, this problem solved.

Putting the solution here, and wish it may help someone......

Calbert answered 26/12, 2019 at 7:33 Comment(0)
A
0

Just uninstall NPCAP and install wpcap. This will fix the issue.

Alejandro answered 22/4, 2020 at 3:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.