No Interfaces Available In Wireshark Mac OS X

來源:互聯網
上載者:User
No Interfaces Available In Wireshark Mac OS X
No Interfaces Available In Wireshark Mac OS X

Many new Wireshark users on Mac OS X run into an issue where no interfaces show up when trying to begin packet capture. If you attempt to manually input an interface (such as en0) this error will occur:


The capture session could not be initiated ((no devices found) /dev/bpf0: Permission denied).


To have the interfaces show up properly you’ll need to widen the permissions on the Berkeley packet filter (BPF). By default they look like this:

  1. crw-------  1 root  wheel 23, 0 Jan 31 13:47 /dev/bpf0

複製代碼

We need the filter to be readable by non-root, so open Terminal.app and run this command:

  1. sudo chmod 644 /dev/bpf*

複製代碼

Unfortunately every time you reboot this will reset, but if you are a frequent user of Wireshark you can add the ChmodBPF StartupItem to alter them automatically (available in the Utilities folder on the Wireshark disk image). To install you’ll need to follow two steps.


First, drag the ChmodBPF folder to the StartupItems alias in the same folder (or drag it to /Library/StartupItems directly). Type your password to authenticate and move the folder into the correct location.


The second requirement is only for 10.6+ users. Starting with Snow Leopard the security permissions of StartupItems are being enforced. Scripts that do not have the proper owner and group will receive this error:


Insecure Startup Item disabled. – “/Library/StartupItems/ChmodBPF” has not been started because it does not have the proper security settings


The proper security settings are ownership of the scripts by root and group of wheel.1 To set them:

  1. sudo chown -R root:wheel ChmodBPF

複製代碼

The correct settings for startup items can be found in this Apple KB article

from:http://langui.sh/2010/01/31/no-i ... wireshark-mac-os-x/


求解ChmodBPF是什麼東西?英文能力有限,大概理解就是capture session所需要的/dev/bpf*沒有許可權,需要賦予許可權,但是從啟後還從新需要直接賦予許可權的命令,那問提到/Library/StartupItems/這裡,應該類似win下的啟動菜單,但是文中ChmodBPF是何物?是自寫的一個處理這個問題的shell指令碼還是?那位童鞋瞭解過 謝謝了:)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.