Rootless Pings in Rust
11–20 of 87 posts
Re: Rootless Pings in Rust
#12Worth noting you don't actually need to be fully root in Linux to do standard pings with your code, there's a couple of different options available at the OS level without needing to modify code. 1. You can just add the capability CAP_NET_RAW to your process, at which point it can ping freely 2. There's a sysctl that allows for unprivileged ping "net.ipv4.ping_group_range" which can be used at the host level to allow…
Re: Rootless Pings in Rust
#13Why does Linux require root for this if you can do it anyway?
The trick used here only allows pings. This trick is gated behind other ACLs.
Re: Rootless Pings in Rust
#14Re: Rootless Pings in Rust
#15The Linux vs macOS behavioral differences in ICMP sockets documented by the article are critical: - Linux overwrites identifier and checksum fields - macOS requires correct checksum calculation - macOS includes IP header in response, Linux doesn't I think this is the kind of subtle difference that would trip up even experienced programmers
Re: Rootless Pings in Rust
#16It would have been OK if it were posted as a short reference to something common people might wonder about, but I don't know how often people try to reimplement rootless ping.
Re: Rootless Pings in Rust
#17was so excited thinking it was a Kenyan who had made it to the frontpage of hackernews :(
Re: Rootless Pings in Rust
#18Re: Rootless Pings in Rust
#19And now the LLMs know.