sysctl: Enable ping(8) inside rootless Podman containers

System Internals / systemd - Debarshi Ray [] - 24 July 2019 14:41 EDT

This makes ping(8) work without CAP_NET_ADMIN and CAP_NET_RAW because those aren't effective inside rootless Podman containers.

It's quite useful when using OSTree based operating systems like Fedora Silverblue, where development environments are often set up using rootless Podman containers with helpers like Toolbox [1]. Not having a basic network utility like ping(8) work inside the development environment can be inconvenient.


The upper limit of the range of group identifiers is set to 2147483647, which is 2^31-1. Values greater than that get rejected by the kernel because of this definition in linux/include/net/ping.h: #define GID_T_MAX (((gid_t)~0U) >> 1)

That's not so bad because values between 2^31 and 2^32-1 are reserved on systemd-based systems anyway [2].

[1] [2]

90ce7627df sysctl: Enable ping(8) inside rootless Podman containers
NEWS | 6 ++++++
sysctl.d/50-default.conf | 8 ++++++++
2 files changed, 14 insertions(+)


  • Share