Difference between revisions of "Wireshark"

From ArchWiki
Jump to: navigation, search
m (Installation: moved the Package Official formatting to a better location)
(Improve formatting)
Line 21: Line 21:
 
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.
  
* Filtering TCP packets
+
{{Note|To learn the filter syntax, see man pcap-filter(7).}}
If you want to see all the current TCP packets, type "tcp" followed by enter into the "Filter" bar.
+
  
* Filtering UDP packets
+
===Filtering TCP packets===
If you want to see all the current UDP packets, type "udp" followed by enter into the "Filter" bar.
+
If you want to see all the current TCP packets, type {{ic|tcp}} into the "Filter" bar.
  
* Filter packets to a specific IP Address
+
===Filtering UDP packets===
If you would like to see all the traffic going to a specific address, you would enter this into the "Filter" bar.
+
If you want to see all the current UDP packets, type {{ic|udp}} into the "Filter" bar.
Please remember to replace 127.0.0.1 with the IP address the outgoing traffic is being sent to.
+
  
{{Note|Do not add the number sign in the "Filter" bar as it is not required nor part of the filter syntax.}}
+
===Filter packets to a specific IP Address===
 +
* If you would like to see all the traffic going to a specific address, enter {{ic|<nowiki>ip.dst == 1.2.3.4</nowiki>}}, replacing {{ic|1.2.3.4}} 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, enter {{ic|<nowiki>ip.src == 1.2.3.4</nowiki>}}, replacing {{ic|1.2.3.4}} with the IP address the incoming traffic is being sent to.
 
+
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
+
 
+
{{Note|To learn the filter syntax, see man pcap-filter(7).}}
+

Revision as of 07:39, 23 December 2011

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.

Installation

The Template:Package Official 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

Capturing as normal user

  • Add yourself to the wireshark group
# gpasswd -a "username" wireshark
  • Log out and log in

A few capturing techniques

There are a number of different ways to capture exactly what you are looking for in Wireshark, by applying filters.

Note: To learn the filter syntax, see man pcap-filter(7).

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 == 1.2.3.4, replacing 1.2.3.4 with 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 == 1.2.3.4, replacing 1.2.3.4 with the IP address the incoming traffic is being sent to.