How to sniff HTTP traffic from the command line on Linux

Suppose you want to sniff live HTTP web traffic (i.e., HTTP requests and responses) on the wire for some reason. For example, you may be testing experimental features of a web server. Or you may be debugging a web application or a RESTful service. Or you may be trying to troubleshoot PAC (proxy auto config) […]
Continue reading…

 

How to capture and replay network traffic on Linux

When you are testing or debugging middlebox hardware such as routers, switches, or IDS/IPS, it is extremely useful to perform the testing with reproducible network traffic. Using repeatable traffic minimizes any kind of uncertainty in the testing environment, thereby making testing results easier to interprete and analyze. In Linux, there is a suites of command-line […]
Continue reading…

 

What are popular packet sniffers on Linux

A typical packet sniffer tool captures live packets from networks, decodes them according to protocol specifications, and optionally takes actions according to the parsed packet contents (e.g., in case of security detection systems). Packet sniffing tools are very useful when you diagnose networks or protect against security attacks over networks. The following are several popular […]
Continue reading…

 

How to install tcpreplay on Linux

Tcpreplay is a suite of command-line utilities that are used to “replay” previously captured packet dumps in a real network. In order to use tcpreplay, you first need to capture live network traffic using packet capture tools such as tcpdump, rewrite TCP/IP packet headers of the captured packets appropriately (usually MAC and IP addresses), and […]
Continue reading…

 

How to find a rogue DHCP server

If your company has a large corporate network shared by many employees, you may have encountered the case where your host machine is getting an IP address assigned by some unknown DHCP server not under the administrative control of the corporate network, which in turn causes various connectivity issues for your host. When a host […]
Continue reading…