tcpdump within Ubuntu container

Martino Rabe

Member
Jul 24, 2016
9
1
23
42
Hello,

today I created a container with ubuntu 22.04 and tried to start tcpdump. Unfortunately tcpdump stops directly after start. I am not even able to use the tcpdump -D command to see the available interfaces. I already tried the following command which I found in the internet.

Code:
host:~# aa-complain tcpdump
Setting /usr/bin/tcpdump to complain mode.
Warning: profile tcpdump represents multiple programs

Does anyone have an idea what I could do in order to get tcpdump running within a container ?
 

oguz

Proxmox Retired Staff
Retired Staff
Nov 19, 2018
5,207
695
118
hi,

i just tested it within a ubuntu 22.04 container and it works just fine here...

can you post the outputs from the following commands:
* pveversion -v
* pct config CTID (replace CTID with your container)
 

Martino Rabe

Member
Jul 24, 2016
9
1
23
42
You are right.
tcpdump -D is still not working (I checked this) but tcpdump -vvv -s0 -w test.pcap is.

Thank you very much
 
Last edited:

oguz

Proxmox Retired Staff
Retired Staff
Nov 19, 2018
5,207
695
118
okay, your config looks normal (and it works here with pretty much the same config) and versions seem to be pretty much up to date.

Unfortunately tcpdump stops directly after start.
do you get any error messages?

can you also try running: strace -o trace.out tcpdump, let it run for a while until it crashes. post the resulting "trace.out" file's contents here


edit: apparently it just works? :)
 

Martino Rabe

Member
Jul 24, 2016
9
1
23
42
I am sorry to steal your time. I just thought that if tcpdump -D is not working the other one is also not working. I should have tested both.
Thank you very much to lead me to test it both :)
 

oguz

Proxmox Retired Staff
Retired Staff
Nov 19, 2018
5,207
695
118
I am sorry to steal your time. I just thought that if tcpdump -D is not working the other one is also not working. I should have tested both.
no worries, though it's interesting that "tcpdump -D" won't work for you, since it works here as well :)
 

Martino Rabe

Member
Jul 24, 2016
9
1
23
42
It is not working again. I am feel I am completely stupid because from my point of view I simple stopped the pcap copied the files and now I tried to start it again. This drives me crazy.

I did the strace as requested.
 

Attachments

  • trace.out.txt
    71.1 KB · Views: 1

Martino Rabe

Member
Jul 24, 2016
9
1
23
42
Ok, I am stupid it is the -w option not tcpdump. I am not allowed to write the file. I currently checking the reason why it is not allowed.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!