This is our old Q&A Site. Please post any new questions and answers at

How to I add a filter to record only HTTP requests and not responses?

asked 10 Jul '12, 05:01

sorin's gravatar image

accept rate: 0%

filter to RECORD only HTTP requests

well, that's not easy. One option would be to use tshark

tshark -i eth0 (or 1,2,3,4... on windows) -R "http.request"

However that will only print the result to STDOUT. You cannot write a pcap file with -w, at least not with the current releases of tshark/wireshark.

However, with a little "trick", you can import the tshark output.

tshark -i eth0 (or 1,2,3,4... on windows) -R "http.request" -x > http_request.txt

In Wireshark

File -> Import

Select http_request.txt and you will get only the requests in Wireshark.

HOWEVER: I would rather capture everything and then (later) use a display filter (http.request) in Wireshark to only display the http requests. Maybe you want to know the answer for some requests ;-)


permanent link

answered 11 Jul '12, 07:16

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
accept rate: 15%

edited 11 Jul '12, 07:39

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 10 Jul '12, 05:01

question was seen: 1,568 times

last updated: 11 Jul '12, 07:39

p​o​w​e​r​e​d by O​S​Q​A