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 -cli and -gtk versions (the cli package is a dependency of the gtk package).
To install both the gui and the cli:
# pacman -S wireshark-gtk
To install just the cli:
# pacman -S wireshark-cli
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:
And load it now with modprobe:
Capturing as normal user
- Add yourself to the wireshark group
# gpasswd -a "username" 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" 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 == 22.214.171.124
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 == 126.96.36.199