Wireshark Tutorial for Beginners: Install, Capture and Read Your First Packets
Wireshark is a powerful, open-source network protocol analyzer used for network troubleshooting, security analysis, and learning. This blog provides a step-by-step guide to installing and using Wireshark, from setting it up to capturing and analyzing network traffic. It covers essential features such as filters, packet details, color coding, statistics, and decryption. Additionally, the blog highlights best practices, including capturing only relevant traffic and respecting privacy. Wireshark is an invaluable tool for anyone looking to deepen their understanding of network communications and enhance their security expertise.
Quick answer: Wireshark is a free, open-source packet analyser that captures network traffic and shows it packet by packet. To use it, install Wireshark (plus Npcap on Windows), pick your network interface, start a capture, filter the results with display filters such as dns or tcp.port == 80, and inspect the layers of each packet. Capture only on networks you own or may test.
Key takeaways
- Wireshark is free and open source, and it works on Windows, macOS and Linux.
- Capture filters limit what is recorded. Display filters limit what you see. Beginners mix these up.
- Three filters get you far: a protocol name (dns, http, tls), ip.addr == x.x.x.x, and tcp.port == n.
- Capture only on your own network or with written permission. Unauthorised sniffing is illegal under India's IT Act.
- HTTPS payloads are encrypted, so you will see handshakes and metadata, not page content.
What is Wireshark used for?
Wireshark records the packets crossing a network interface and breaks each one into protocol layers: Ethernet, IP, TCP or UDP, then the application protocol. Network engineers use it to find why something is slow or failing. Security analysts use it to inspect suspicious traffic. Students use it to see how DHCP, DNS and TCP really work. Full documentation is on the Wireshark docs site.
How do you install Wireshark?
- Download the installer for your system from the official Wireshark website.
- On Windows, accept the packet capture driver (Npcap) when the installer offers it.
- On Debian-based Linux such as Kali or Ubuntu, install with
sudo apt install wireshark. When asked whether non-superusers may capture packets, choose yes, then add yourself to the group withsudo usermod -aG wireshark $USERand log in again.
Running the whole GUI with sudo wireshark works but is not good practice, because the large dissector code then runs as root. Giving capture rights to a group is safer.
How do you capture your first packets?
- Open Wireshark. The start screen lists interfaces (Wi-Fi, Ethernet, loopback). The one with a moving graph line is active.
- Double-click the interface to start capturing.
- In a browser, visit a site or run
ping example.comin a terminal. - Click the red square to stop. Save with File, Save As if you want to keep it.
How do you read the Wireshark window?
There are three panes. The packet list shows one row per packet with number, time, source, destination, protocol, length and a summary. The packet details pane shows the layers of the selected packet, which you can expand. The packet bytes pane shows the raw hexadecimal and ASCII. Colour rules help: for example, TCP problems and resets stand out.
What is the difference between a capture filter and a display filter?
A capture filter is set before you start and tells the capture library which packets to record at all, for example host 192.168.1.10 or port 53. It uses BPF syntax. A display filter is typed in the green bar after capture and only hides packets from view, for example dns or ip.addr == 192.168.1.10. Display filters are more powerful and reversible, so beginners should capture broadly and filter on screen.
| Goal | Display filter |
|---|---|
| Show DNS only | dns |
| Traffic to or from a host | ip.addr == 192.168.1.10 |
| Web traffic on port 80 | tcp.port == 80 |
| TLS handshakes | tls.handshake |
| New TCP connection attempts | tcp.flags.syn == 1 && tcp.flags.ack == 0 |
| Ping | icmp |
For a bigger set, see our Wireshark filters guide.
Exercise: watch a DNS lookup and a TCP handshake
- Start a capture, then run
nslookup example.com. - Apply the filter
dns. Find the query and the response. Expand the response and read the answer record. - Now open a website and clear the filter. Find a packet with SYN, then SYN-ACK, then ACK. That is the three-way handshake.
- Right-click a TCP packet and choose Follow, TCP Stream to see one conversation as a whole.
Write down what you saw in your own words. That note is the study value of the exercise.
What can Wireshark not show you?
HTTPS and other encrypted traffic is unreadable without keys, so you see the TLS handshake, server names in some cases, timing and sizes, not the page. On switched networks you see only your own traffic plus broadcast and multicast unless you use a mirror (SPAN) port on equipment you control. Wi-Fi capture needs a monitor-mode adapter.
Is it legal to use Wireshark on any network?
No. Capture on your own devices, your home or lab network, or a network where you have written authorisation. Capturing other people's traffic without permission can breach India's IT Act and privacy law. Packet captures also contain sensitive data, so store and share them carefully.
Common beginner mistakes
- Capturing on the wrong interface and seeing nothing.
- Typing a display filter in the capture filter box (syntax differs).
- Expecting to read HTTPS bodies.
- Capturing for hours and creating a file too large to open. Use a ring buffer or stop sooner.
Next steps
To go further, read Wireshark packet analysis for ethical hacking. WebAsha's CCNA training gives you the networking background that makes captures easy to read.
Related reading
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0