Capture network traffic of a Proxmox VM
In order to capture the network traffic that goes through a network interface of a Proxmox VM, do the following:
- Get the Proxmox VM ID.
- Get the Proxmox VM interface name.
- On the Proxmox node that hosts the VM, check that there's a
tap
network interface namedtap<VM_ID>i<NET_INTERFACE_ID>
. - On the Proxmox node that hosts the VM, run
tcpdump
in order to capture network traffic to a file:
sh
tcpdump -i tap<VM_ID>i<NET_INTERFACE_ID> -n -w <filename>.pcap