[SOLVED] Why does the ping command flat out not work in a container?

tobywhiting10

Member
Jan 15, 2022
19
1
8
UK
tobywhiting10.com
Set up a standard Ubuntu 22.04.5 LTS container in Proxmox 8.3.2 to run nginx

Eventually went to run the ping command and was surprised when it simply didn't work: no 'command not recognised', no errors. It simply does nothing.
1736187740908.png
Googling around gives a bunch of results about network issues but I know the networking isn't a problem, it can talk with other devices just fine.

Doubt this is a proxmox issue and more something to do with Ubuntu, but wasn't really sure where else to go.
Any insight would be much appreciated
 
Hello tobywhiting10, my guess is that there might be some internet configuration or firewall issue. The thing is, ping will show errors if it receives an ICMP error, but is not required to show errors otherwise (e.g. if no response is received at all).

Just to be sure, you might want to check the output of ping -Ov IP_ADDRESS to see more information. If you still have issues, you can post the output of that command here.
 
Unless Ubuntu does something completely different than other Linux distros, the ping command will ping forever and send a packet each second. This seems like a problem in Ubuntu.
 
Set up a standard Ubuntu 22.04.5 LTS container in Proxmox 8.3.2 to run nginx

Eventually went to run the ping command and was surprised when it simply didn't work: no 'command not recognised', no errors. It simply does nothing.
View attachment 80298
Googling around gives a bunch of results about network issues but I know the networking isn't a problem, it can talk with other devices just fine.

Doubt this is a proxmox issue and more something to do with Ubuntu, but wasn't really sure where else to go.
Any insight would be much appreciated
What do the following commands yield?

ping -Ov 1.1.1.1

and
cat /etc/network/interfaces
 
  • Like
Reactions: tobywhiting10
The only time I've seen commands do absolutely nothing is when the new processes get killed immediately because the system is running out of resources like memory or file handles. This should show in the system logs (journalctl) inside the container.
 
What do the following commands yield?

ping -Ov 1.1.1.1

and
cat /etc/network/interfaces
I ran the command as you suggested and it said I needed sudo privileges, went back and tried the regular ping command but with sudo and it started working.
First time I've ever had to use sudo to run a ping command, Never thought to cheque

First time I've ever had to use sudo to run a ping command, Never thought to check ㄟ( ▔, ▔ )ㄏ