Difference between revisions of "Wireshark"

From ArchWiki
Jump to: navigation, search
(A few capturing techniques)
(A few capturing techniques)
Line 35: Line 35:
 
There are a number of different ways to capture exactly what you are looking for in Wireshark, by applying filters.
 
There are a number of different ways to capture exactly what you are looking for in Wireshark, by applying filters.
 
Please note not to add the number sign in the "Filter" bar as it is not required nor part of the filter syntax.
 
Please note not to add the number sign in the "Filter" bar as it is not required nor part of the filter syntax.
 +
 
* Filtering TCP packets
 
* Filtering TCP packets
 
  If you want to see all the current TCP packets, type "tcp" followed by enter into the "Filter" bar.
 
  If you want to see all the current TCP packets, type "tcp" followed by enter into the "Filter" bar.

Revision as of 22:07, 12 August 2010

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Wireshark#)

Possible problems and how to solve

Your wireshark is not working properly and prints out messages like following even when run as root:

capset(): Operation not permitted

This is due libcap and wireshark now needs capability kernel module to be loaded.


Include it in your MODULES array in rc.conf so it will be automatically loaded in next boot:

MODULES=(... capability)

And load it now with modprobe:

modprobe capability


Capturing as normal user

Running Wireshark as root is not a good thing, and can be dangerous for your system. To be able to capture as normal user do this (as root):

  • Make wireshark group
groupadd wireshark
  • Add your self to the wireshark group
gpasswd -a "your_username" wireshark
  • Change permissions for /usr/bin/dumpcap (eventually, you'll have to do this after every update of Wireshark)
chgrp wireshark /usr/bin/dumpcap
chmod 754 /usr/bin/dumpcap
setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap


A few capturing techniques

There are a number of different ways to capture exactly what you are looking for in Wireshark, by applying filters. Please note not to add the number sign in the "Filter" bar as it is not required nor part of the filter syntax.

  • Filtering TCP packets
If you want to see all the current TCP packets, type "tcp" followed by enter into the "Filter" bar.
  • Filtering UDP packets
If you want to see all the current UDP packets, type "udp" followed by enter into the "Filter" bar.
  • Filter packets to a specific IP Address

If you would like to see all the traffic going to a specific address, you would enter this into the "Filter" bar. Please remember to replace 127.0.0.1 with the IP address the outgoing traffic is being sent to.

# ip.dst == 1.0.0.1

If you would like to see all the incoming traffic for a specific address, you would enter this into the "Filter" bar. Please remember to replace 127.0.0.1 with the IP address the incoming traffic is being sent to.

# ip.src == 1.0.0.1

Sources