This program allows you to dump the traffic on a network. tcpdump is able to
examine IPv4, ICMPv4, IPv6, ICMPv6, UDP, TCP, SNMP, AFS BGP, RIP, PIM, DVMRP,
IGMP, SMB, OSPF, NFS and many other packet types.
It can be used to print out the headers of packets on a network interface,
filter packets that match a certain expression. You can use this tool to track
down network problems, to detect attacks or to monitor network activities.
This snap is not maintained by https://www.tcpdump.org/ and instead packages
the deb of tcpdump from the Ubuntu archive as a snap. Please see the developer
website (below) for details.
$ sudo tcpdump
tcpdump will drop privileges to the snap_daemon user and group by default. To write out captures, the /var/snap/tcpdump/common/captures directory is created with snap_daemon ownership. Eg: