random technical thoughts from the Nominet technical team

Wireshark capture under Mac OS X

1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 4.75 out of 5)
Loading ... Loading ...
Posted by ian on Apr 30th, 2008

Wireshark is a free, open source network protocol analyzer. It can be used as a graphical interface when viewing tcpdump files. Alternatively, it can be used to capture live network traffic. For this, it must be able to read raw data from network interfaces. Using the standard install from DMG package under Mac OS X this is not straightforward.

By default the /dev/bpf* interfaces are owned by root with permissions set to rw-------. They can be opened for reading using sudo chmod go+r /dev/bpf*, but this is not persistent across reboots. To permanently ensure that Wireshark can be used in capture mode it is necessary to run this command on start up. The mechanism to do this is explained here. I made a slight modification to the ChmodBPF script to run the command above. The gzipped file is attached. Simply unzip this and put it in /Library/StartupItems.

4 Responses

  1. John Burgoon Says:

    Thanks for sharing your work. I learned a lot about my Mac just by carefully following your explanation and code.

    Cheers!
    John Burgoon

  2. CantRemembrances » Blog Archive » Remote Debugging using JConsole, JMX and SSH Tunnels Says:

    […] app will warn you that this is unsafe, but it works. The Nominet team says that you can address this issue by […]

  3. Dan Says:

    Thanks. I’ve seen variations of this info across the web for setting permissions for bpf, but this is the first that I’ve found that works. You said the gzipped file to run the command on startup is attached, but I’m not seeing it. Are you referring to the zipped file in the link you posted?

    Dan

  4. Rut Says:

    Thank you. This worked. One main note. You chmod, you have to have root access. There is a document outlining how to enable root login for the various OS X versions.

    Go to apple support and search for enabling root account.

    http://support.apple.com/kb/HT1528

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Recent Posts

Highest Rated

Categories

Archives

Meta: