commit: 043c6d715988472a730d79222adf96de3ae2c681 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Wed Sep 3 20:38:26 2025 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Wed Sep 3 20:40:02 2025 +0000 URL: https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=043c6d71
Set net.ipv4.ping_group_range sysctl This will allow unprivileged users to use the ping command. sysctl.d snippet taken from systemd. Bug: https://bugs.gentoo.org/962112 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> lib/sysctl.d/40-ping_group_range.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/sysctl.d/40-ping_group_range.conf b/lib/sysctl.d/40-ping_group_range.conf new file mode 100644 index 00000000..b689639d --- /dev/null +++ b/lib/sysctl.d/40-ping_group_range.conf @@ -0,0 +1,5 @@ +# ping(8) without CAP_NET_ADMIN and CAP_NET_RAW +# The upper limit is set to 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) +-net.ipv4.ping_group_range = 0 2147483647
