Keep a copy of the interface description and capture filter around so that
[metze/wireshark/wip.git] / README.bsd
1 $Id$
2
3 Installing Wireshark on FreeBSD/OpenBSD/NetBSD/DragonFly BSD
4 ========================================================================
5
6      1. Extra packages required
7      2. Compiling Wireshark 
8      3. Berkeley Packet Filter (BPF) requirement
9      4. Running Wireshark as a non-root user
10
11
12 1. Extra packages required
13 ---------------------------
14 Wireshark requires a number of additional programs to function.
15 Install the latest versions of the following programs before compiling:
16
17     atk
18     cairo
19     expat
20     gettext
21     glib2
22     glitz
23     gtk2 / gtk+2
24     jpeg
25     pango
26     pkgconfig
27     png
28     tiff
29
30 The easiest way to install these is by using your operating system's
31 ports or packages system.
32
33
34 2. Compiling Wireshark
35 -----------------------
36 To compile Wireshark with the default options, run configure, make and
37 make install:
38
39      ./configure
40      make
41      make install
42
43 The configure and make steps can be run as a non-root user and you can
44 run Wireshark from the compilation directory itself.  You must run make
45 install as root in order to copy the program to the proper directories.
46
47
48 3. Berkeley Packet Filter (BPF) requirement
49 --------------------------------------------
50 In order to capture packets (with Wireshark/TShark, tcpdump, or any
51 other packet capture program) on a BSD system, your kernel must have the
52 Berkeley Packet Filter mechanism enabled.  The default kernel
53 configurations in recent versions of BSD systems have this enabled
54 already.  To verify the bpf device is present, look in the /dev
55 directory:
56
57     ls -l /dev/bpf*
58
59 You should see one or more bpf devices listed similar to this:
60
61     crw-------  1 root  wheel    0,  90 Aug 10 21:05 /dev/bpf0
62     crw-------  1 root  wheel    0,  91 Aug 10 21:05 /dev/bpf1
63
64 Packet-capturing programs will pick the first bpf device that's not in
65 use.  Recent versions of most BSDs will create bpf devices as needed, so
66 you don't have to configure the number of devices that will be
67 available.
68
69 4. Running wireshark as a non-root user
70 -------------------------------------------
71 Since the bpf devices are read-only by the owner (root), you normally
72 have to run packet capturing programs such as Wireshark as root.  It is
73 safer to run programs as a non-root user if possible.  To run Wireshark
74 as a non-root user, you must change the permissions on the bpf device(s).
75 If you are the only user that needs to use Wireshark, the easiest way
76 is to change the owner of each bpf device to your username.  You can also
77 add the read/write ability to the group (typically wheel) and add users
78 that need to use Wireshark to the wheel group.  Check your operating
79 system's documentation on how to make permanent these changes as they
80 are often reset upon reboot; if /dev is implemented with devfs, it might
81 be possible to configure devfs to create all bpf devices owned by a
82 particular user and/or group and with particular permissions.  In
83 FreeBSD 6.0 and later this can be done by creating an /etc/devfs.rules
84 file with content such as
85
86         [localrules=10]
87         add path 'bpf*' {mode and permissons}
88
89 where "mode and permissions" can include clauses such as
90
91         mode {octal permissions}
92
93 to set the permissions on the device (e.g., "mode 0660" to set the
94 permissions to rw-rw-r--),
95
96         user {user}
97
98 to set the user who owns the device, or
99
100         group {group}
101
102 to set the group that owns the device and adding a line such as
103
104         devfs_system_ruleset=localrules
105
106 to /etc/rc.conf.  For example, an /etc/devfs.rules file with
107
108         [localrules=10]
109         add path 'bpf*' mode 0660 group wheel
110
111 will grant read and write permissions on all BPF devices to all users in
112 the "wheel" group.