In Linux, wireshare cannot find the NIC. Solution

Source: Internet
Author: User

Tested and available

Ubuntu12.04 I used

Install wireshare directly in the software library

When the software is turned on, the network card cannot be found, and the network card says the permission is insufficient. The solution is as follows:



Translation from http://packetlife.net/blog/2010/mar/19/sniffing-wireshark-non-root-user/

This article introduces the methods in Linux. When Windows users start Wireshark for the first time in Linux by referring to Wireshark's wiki, they may wonder why they cannot see any network adapter, such as eth0. This is because direct access to these devices requires
Root permission. Then, I used the root permission. Of course, this is a bad practice. For example, in Gentoo, the system will prompt Wireshark contains over one point five million lines of source code. Do not run them as root. What should I do? Leader Gerald combs of Wireshark pointed out that most Linux distributions are now using raw network devices. You can use this method to start Wireshark from common users. The procedure is as follows:


1. Install setcap. Setcap is part of the libcap2-bin package, which is installed by default.

Sudo apt-Get install libcap2-bin

2. Create a Wireshark group. This step is also completed when Wireshark is installed.

# Groupadd-G Wireshark
# Usermod-a-g wireshark <User Name>
# Chgrp Wireshark/usr/bin/dumpcap
# Chmod 4750/usr/bin/dumpcap 3. grant permissions.

# Setcap cap_net_raw, cap_net_admin = EIP/usr/bin/dumpcap complete.


You can use getcap/usr/bin/dumpcap for verification. The output should be:/usr/bin/dumpcap = cap_net_admin, cap_net_raw + EIP.
Now, you can start Wireshark packet capture from your normal users.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.