Wireshark filters
125 ready-to-use display filters for the green filter bar in Wireshark, from the everyday ones to the few that solve most packet-loss and TLS problems. They only hide packets from the list, so you can change them at any time and nothing is lost. Click Copy and paste one straight into Wireshark.
Capture filters are a different thing: they use BPF syntax (the same as tcpdump), are set in Capture → Options before the capture starts, and whatever they reject is never recorded. They are at the bottom of this page — do not paste them into the display filter bar.
Field names change between Wireshark versions; these follow the current ones in 3.x and 4.x. If Wireshark refuses a filter, check the field name in the packet details pane — the status bar tells you exactly which part it did not understand.
Syntax basics
ip.src == 10.0.0.1
!(ip.addr == 10.0.0.9)
tcp && ip.addr == 10.0.0.5
http || dns
!arp
http.host contains "example"
http.request.uri matches "^/api/v[0-9]+/"
udp.port in {53, 123, 5353}
ipv6.addr == 2001:db8::/32
frame.len > 1400
frame contains "password"
http.user_agent
eth.dst[0:3] == 00:1a:2b
Addresses
ip.addr == 10.0.0.5
ip.src == 10.0.0.5
ip.addr == 10.0.0.5 && ip.addr == 203.0.113.9
ip.addr == 10.0.0.0/8
!(ip.addr == 10.0.0.5)
ipv6.addr == 2001:db8::1
eth.addr == 00:11:22:33:44:55
eth.dst == ff:ff:ff:ff:ff:ff
eth.src[0:3] == 00:11:22
ip.ttl < 5
ip.flags.df == 1
ip.frag_offset > 0
Protocols
tcp
udp
arp
icmp
dns
http
tls
dhcp
ntp
ssh
ftp
smtp
quic
mdns
nbns
llmnr
ssdp
smb2
snmp
radius
stun
tls || quic
arp || icmpv6
tcp.port == 80 || tcp.port == 8080
TCP and UDP
tcp.port == 443
udp.port == 53
tcp.srcport == 54321
tcp.port in {80, 443, 8080}
tcp.flags.syn == 1 && tcp.flags.ack == 0
tcp.flags.reset == 1
tcp.flags.fin == 1
tcp.len == 0
tcp.len > 0
tcp.analysis.retransmission
tcp.analysis.fast_retransmission
tcp.analysis.duplicate_ack
tcp.analysis.zero_window
tcp.analysis.flags
tcp.stream eq 4
tcp.window_size_value < 1000
tcp.time_delta > 0.5
HTTP
http.request
http.request.method == "POST"
http.host == "example.com"
http.request.uri contains "/login"
http.request.full_uri contains "api"
http.response.code == 404
http.response.code >= 400
http.response.code == 301 || http.response.code == 302
http.content_type contains "json"
http.user_agent contains "curl"
http.cookie contains "session"
http.authorization
http2.header.value contains "example.com"
DNS
dns.flags.response == 0
dns.qry.name == "example.com"
dns.qry.name contains "google"
dns.qry.type == 1
dns.qry.name == "example.com" && dns.qry.type == 28
dns.flags.rcode != 0
dns.flags.rcode == 3
dns.count.answers == 0
dns.time > 0.5
dns.qry.name contains "example.com" && dns.flags.response == 1
tcp.port == 53
TLS
tls.handshake
tls.handshake.type == 1
tls.handshake.type == 2
tls.handshake.type == 11
tls.handshake.extensions_server_name == "example.com"
tls.handshake.extensions_server_name contains "example"
tls.handshake.extensions_alpn_str == "h2"
tls.handshake.extensions.supported_version == 0x0304
tls.alert_message
tls.alert_message.level == 2
tls.handshake.ja3
tls.app_data
tls && ip.addr == 10.0.0.5
ssl.record.length
DHCP, ARP and ICMP
dhcp.option.dhcp == 1
dhcp.option.dhcp == 3
dhcp.hw.mac_addr == 00:11:22:33:44:55
dhcp.option.hostname contains "laptop"
dhcp.option.dhcp_server_id == 10.0.0.1
arp.opcode == 1
arp.dst.proto_ipv4 == 10.0.0.5
arp.duplicate-address-detected
icmp.type == 8
icmp.type == 3
icmp.type == 11
icmpv6.type == 135 || icmpv6.type == 136
icmpv6.type == 133 || icmpv6.type == 134
Finding the needle
!(arp || mdns || nbns || llmnr || ssdp)
!(icmpv6.type == 135 || icmpv6.type == 136)
ip.addr == 10.0.0.5 && tcp.port == 443
ip.addr == 10.0.0.5 && !(ip.addr == 10.0.0.9)
tcp.flags.syn == 1 && tcp.flags.ack == 0 && tcp.analysis.retransmission
tcp.len > 0 && ip.addr == 10.0.0.5
_ws.malformed
_ws.col.Info contains "Retransmission"
Capture filters (BPF)
These belong in Capture → Options → Capture filter, or on the tcpdump and dumpcap command line. What they drop is never written to the file, so when in doubt capture everything and filter afterwards with a display filter.
host 10.0.0.5
src host 10.0.0.5
net 10.0.0.0/8
port 53
tcp port 443
portrange 5060-5070
host 10.0.0.5 and port 443
not arp
udp and not port 53
vlan 100
ether host 00:11:22:33:44:55
tcp[tcpflags] & tcp-syn != 0
Working faster
- Build filters by right-clicking a field in the packet details: Apply as Filter → Selected writes the filter for you, Prepare as Filter lets you edit it first.
- Follow → TCP / UDP / HTTP Stream on a packet shows one whole conversation as readable text — usually faster than reading packets one by one.
- Statistics → Conversations lists who talks to whom and how much, and Protocol Hierarchy shows what the capture is made of. Both are good first steps on an unknown capture.
- The filter bar turns green for a valid filter and red for a syntax error, and suggests field names as you type.
- File → Export Specified Packets saves only what is currently displayed, so a display filter is also the way to cut a large capture down to the interesting part.
- The same filter works from the command line:
tshark -r capture.pcap -Y "http.response.code >= 400", where-Yis a display filter and-fa capture filter. - Traffic on unusual ports is not always recognised as the protocol you expect; use Analyze → Decode As… when, for example, HTTP runs on port 8080.
- Display filters never modify the capture file, so experimenting costs nothing.