How to capture the traffic in docker linux?

Hello sir
I installed a debian 11 using docker in Vyos.
I tried to capture the traffic but I got these error
I can’t understand because by defaut by account is root. why I have no permition?

root@vyos:/ddos# tcpdump -i eth0 ‘dst and (dst port 161 or 162)’ -w wireshark.pcap
bash: /usr/bin/tcpdump: Operation not permitted

You have to setup proper capabilities

set container name FOO cap-add xxx

And VyOS doesn’t use docker, it uses podman

1 Like