Why is a site slow? Which device in your home is "eating" all the bandwidth? What is a "smart" light bulb sending to the internet? Wireshark , the world's most widely used network protocol analyzer, answers all of these questions. It's free , open source, and works on Windows , Linux , and macOS.
The guide covers the current Wireshark 4.6.x series : from installation and first capture, to filters, statistics, problem analysis, and decrypting your own HTTPS traffic.
Installation
Windows
Download the installer from wireshark.org/download and follow the steps. During the installation we will recommend Npcap , the driver that allows packet capture. Leave it selected: without it, Wireshark will only open saved files.
Linux (Ubuntu, Debian, Mint)
sudo apt install wiresharkWhen asked if regular users can capture packets, answer Yes . Then add your account to the wireshark group and log out and back in so you don't have to run Wireshark as root:
sudo usermod -aG wireshark $USERMacOS
Install the .dmg file from the official page, along with the included ChmodBPF to allow recording without administrator privileges.
The first recording
1. Open Wireshark. On the home screen you see your network cards, each with a small graph of activity.
2. Double-click on the card that has traffic (usually Wi-Fi or Ethernet ). The recording starts immediately.
3. Open a site in the browser to create traffic, then stop recording with the red square in the toolbar.
4. Save me File → Save As, in the form .pcapng, to analyze it later or send it to someone who can help.
The initial screen: you select the network card that has traffic
The Wireshark window
The main window is divided into three sections:
- Package list: one packet per line, with number, time, sender (Source), recipient (Destination), protocol and a short description (Info).
- Details: the selected package per layer (Ethernet, IP, TCP/UDP, application). Open each layer with the arrow.
- Bytes: the same packet in hexadecimal format, exactly as it traveled over the cable.

The three sections of the central window
Colors matter: with default settings, TCP is shown in light purple, UDP (e.g. DNS) in light blue, and HTTP in light green, while lines with a black background and red letters indicate problems, such as TCP retransmissions. If you see a lot of these, something is wrong with the connection.
Display filters: the most useful tool
A few minutes of recording contains tens of thousands of packets. The display filters (display filters) keep only what you are interested in on the screen, without deleting the rest. You write the filter in the line above the list and press Enter: the line becomes green when the filter is correct and red when he is wrong.
The filter bar: green for valid filter, red for error
| Filter | What does it display? |
| ip.addr == 192.168.1.10 | All traffic to and from one device |
| tcp.port == 443 | HTTPS traffic |
| dns | Only DNS queries and responses |
| dns.time > 0.5 | DNS responses that took more than half a second |
| http.request | HTTP requests (unencrypted) |
| tls.handshake.type == 1 | Initial TLS connections: Client Hello shows the site name (SNI) |
| tcp.analysis.flags | All TCP problems: retransmissions, double acknowledgements, zero windows |
| !(arp or dns or icmp) | Everything except the network "noise" |
| frame contains “iguru” | Packages containing the text "iguru" |
Tip: you don't need to remember the field names. In the packet details, right-click on any field and choose Apply as Filter → Selected : and Wireshark writes the filter for you.
Logging filters
Capture filters are different: they are applied before the recording, so whatever they exclude is not saved at all. They use a different syntax (BPF) and you write them in the field on the home screen. They are useful for long recordings, where you want small files.
| Log filter | What does it record? |
| hosts 192.168.1.10 | Only the movement of a device |
| port 53 | DNS only |
| net 192.168.1.0/24 | Local network traffic only |
| not port 443 | Everything but HTTPS |
Follow Stream: the entire "discussion"
A connection consists of dozens of packets. To view it as a single conversation, right-click on a packet and select Follow → TCP Stream. With Red everything your computer sends is displayed and with blue the answer.
Follow TCP Stream on an unencrypted HTTP connection
On HTTP connections, you read everything, which is a good example of why you shouldn't give passwords to non-HTTPS pages. HTTPS connections appear encrypted; see below for how to decrypt your own traffic.
Statistics: the big picture
- Statistics → Conversations: all "conversations" between addresses. Sort by Bytes and you immediately see which device and which server are consuming the bandwidth.
- Statistics → Protocol Hierarchy: what percentage of the traffic is HTTPS, DNS, video and other protocols.
- Statistics → I/O Graphs: the movement in time, ideal for detecting "stuckness" or sudden spikes.
- Analyze → Expert Information: Wireshark automatically collects the warnings and errors in the log.

Statistics → Conversations sorted by Bytes
Practical examples
Why is a site slow?
1. Start recording, open the site and stop once it loads.
2. Filter dns.time > 0.5 : if packets appear, the DNS server is at fault. Try another one, e.g. 1.1.1.1 or 9.9.9.9.
3. Filter tcp.analysis.flags : many retransmissions mean line or Wi-Fi losses, not a site problem.
Which device at home is wasting bandwidth?
Record for a few minutes and open Statistics → Conversations → IPv4 , sorted by Bytes. The first line is the “culprit”. Note: on Wi-Fi you see mainly the traffic of your own computer; for the entire network you need to record on the router or on a mirror port of a switch.
Decrypting your own HTTPS traffic
Chrome, Edge, and Firefox can store TLS connection keys in a file, which Wireshark reads to decrypt your traffic. Great for developers and learning.
1. Set the environment variable (Windows Command Prompt):
setx SSLKEYLOGFILE "%USERPROFILE%\sslkeys.log"2. Close the browser completely and reopen it so that it reads the setting.
3. In Wireshark: Edit → Preferences → Protocols → TLS → (Pre)-Master-Secret log filename and select the file sslkeys.log.
Setting the key file in Wireshark's TLS preferences.
Security: the key file decrypts all your browser connections. When you're done, delete it and remove the setting with the command reg delete HKCU\Environment /v SSLKEYLOGFILE /f.
For advanced users: tshark and dumpcap
Along with Wireshark, command-line tools are also installed, ideal for servers without a graphical interface and for automation:
tshark -i 1 -f "port 53" -w dns.pcapngIt only records DNS from card 1 (you can see the cards with tshark -D ).
tshark -r dns.pcapng -Y "dns.flags.response == 0" -T fields -e dns.qry.nameFrom a saved file, it displays only the requested names, one per line.
dumpcap -i 1 -b filesize:100000 -b files:10 -w capture.pcapng“Ring” recording for long-term monitoring: 10 files of approximately 100 MB, where the oldest is overwritten, so that the disk never fills up.
Useful tips
- Record as needed: A few minutes of recording is usually enough, and small files are much easier to analyze.
- Time read: by View → Time Display Format select "Time of Day" to see the actual time of each package.
- Privacy: a recording may contain sensitive data. Do not publish .pcapng files without reviewing them.
- Updates: Wireshark reads data from the network, so always keep the latest version; each update fixes vulnerabilities.






Bravo-Bravo! Very useful