Wireshark is a free and open-source packet analyzer. It is used for network troubleshooting, analysis, software and communications protocol development, and education. Originally named Ethereal, in May 2006 the project was renamed Wireshark due to trademark issues.
The wireshark package has been split into the CLI version as well as GTK and Qt frontends, which depend on the CLI.
Capturing as normal user
Running Wireshark as root is insecure.
$ getcap /usr/bin/dumpcap
/usr/bin/dumpcap = cap_net_admin,cap_net_raw+eip
/usr/bin/dumpcap is the only process that has privileges to
/usr/bin/dumpcap can only be run by root and
members of the
There are two methods to capture as a normal user :
Add the user to the wireshark group
To use wireshark as a normal user, add user to the wireshark group:
# gpasswd -a username wireshark
To make your session aware of this new group without having to log in again, you can use this command before launching wireshark:
$ newgrp wireshark
You can use sudo to temporarily change group to
wireshark. The following line allows all users in the wheel
group to run programs with GID set to wireshark GID:
%wheel ALL=(:wireshark) /usr/bin/wireshark, /usr/bin/tshark
Then run wireshark with
$ sudo -g wireshark wireshark
A few capturing techniques
There are a number of different ways to capture exactly what you are looking for in Wireshark, by applying filters.
Filtering TCP packets
If you want to see all the current TCP packets, type
tcp into the "Filter" bar.
Filtering UDP packets
If you want to see all the current UDP packets, type
udp 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, enter
ip.dst == 22.214.171.124, replacing
126.96.36.199with the IP address the outgoing traffic is being sent to.
- If you would like to see all the incoming traffic for a specific address, enter
ip.src == 188.8.131.52, replacing
184.108.40.206with the IP address the incoming traffic is being sent to.
- If you would like to see all the incoming and outgoing traffic for a specific address, enter
ip.addr == 220.127.116.11, replacing
18.104.22.168with the relevant IP address.