Ping command broken in Nix repls

Problem description:
Whenever attempting to run the ping command on any target within a Nix-based repl, a permission denied exception will occur.

Expected behavior:
The ping command will go through and test the availability of the target machine.

Actual behavior:
I’ve tested this with any of the available Nix packages that implement ping:


In every case, a permission denied exception will occur. Below are some sample outputs:

  • Toybox

ping: socket SOCK_DGRAM 1: Permission denied
Kernel bug workaround:
echo 0 99999999 | sudo tee /proc/sys/net/ipv4/ping_group_range

  • IPUtils

ping: socket: Operation not permitted

  • Busybox

PING ( 56 data bytes
ping: permission denied (are you root?)

Steps to reproduce:
Create a new Nix-based repl, install one of the packages that implement ping, and execute ping on any target within the shell.

1 Like

Hi @akac

The Repl would not be able to ping an external site. Can you give more details about what you are trying to use ping for?