

The "Filter Expression" dialog box can help you build display filters. For display filters, try the display filters page on the Wireshark wiki. For example, to capture only packets sent to port 80, use: dst tcp port 80Ĭouple that with an http display filter, or use: tcp.dstport = 80 & httpįor more on capture filters, read " Filtering while capturing" from the Wireshark user guide, the capture filters page on the Wireshark wiki, or pcap-filter (7) man page. However, since HTTP runs over TCP and http only shows packets using the HTTP protocol, this can miss many of the packets associated with the session because they are TCP packets (SYN, ACK and so on). If you want to measure the number of connections rather than the amount of data, you can limit the capture or display filters to one side of the communication. HTTP in Wireshark HTTP traffic shows up as a light green in Wireshark and can be filtered using http. Note that a filter of http is not equivalent to the other two, which will include handshake and termination packets.

On both windows and linux you should be able to use Apache's mod_proxy ProxyRemote settings to direct traffic to your proxy server.Ping packets should use an ICMP type of 8 (echo) or 0 (echo reply), so you could use a capture filter of: icmpĪnd a display filter of: icmp.type = 8 || icmp.type = 0įor HTTP, you can use a capture filter of: tcp port 80

On linux this is relatively easy using iptables - the mitmproxy gives setup instructions for that.

The tricky part is getting the data to pass through the proxy. Now that you've clarified the traffic is from your webserver to a third party, I have another option for you, if you are on Linux or Mac: mitmproxyĮither fiddler or mitmproxy should be able to do the man in the middle decryption for you. This only works if you have access to the private key - you won't be able to decrypt traffic to/from stackexchange this way, but you can use it for web servers you control. So if you are on the webserver end of things, load your SSL private key into Wireshark and it will decrypt the traffic for you. Wireshark WILL work if you have the SSL private key file. This will of course throw up scary invalid certificate warnings unless you add Fiddler's CA certificate to your browser/OS. But Fiddler is able to decrypt both connections. For that, you can use the debugger built into the browser, or something like Fiddler, which runs as a proxy server on your machine and decrypts HTTPS traffic.įiddler does this by sitting in the middle - the webserver is having an HTTPS conversation with Fiddler, and your browser is having an HTTPS conversation with Fiddler. Wireshark isn't the best tool for analysing HTTPS traffic. Anyone doing packet captures anywhere between the browser and webserver just see encrypted traffic. HTTPS encrypts the contents of the message from anyone snooping on the wire - which is exactly what you are doing - so it's working as intended.
