Network monitoring and sniffing

On Linux, command-line tools can display network connections, routing tables, and a number of network interface statistics: the iproute2 command to see network status (including open ports), tcp/udp connections, etc; the sockstat command to show open sockets (not default installed in debian and its branches but available from repository with no dependencies); and the lsof command to list open files such as network sockets and files on disks. With tcpdump packets from the network traffic can be captured.