Restricting ICMP

Markie markie at
Wed Aug 13 06:16:13 PDT 2003

----- Original Message -----
From: "Andy Farkas" <andyf at>
To: "Mark" <admin at>
Cc: <freebsd-questions at>
Sent: Wednesday, August 13, 2003 1:01 PM
Subject: Re: Restricting ICMP

> Mark wrote:
> > I am just not very fond of the idea of local users starting ICMP wars
> > the net, using my server :) I have already had an instance where a
> > did an excessive ping attack on one of his buddies. And, naturally, I
> > to prevent that. The chmod u-s idea mentioned here, was a good idea.
> > that, prefereably, I'd like all of wheel to have access, and the rest
> > And that may be harder to implement.
> If your users play up, put your BOFH hat on and lart them.
> chmod'ing /sbin/ping is useless - users can compile their own version of
> ping.

Is it? I thought it was setuid root for a reason :o)

mrboo at beast:/home/mrboo$ ls -l /sbin/ping
-r-sr-xr-x  1 toor  wheel  469492 Aug 11 14:57 /sbin/ping

No but really, copy ping to your user home, as a user, from
/usr/src/sbin/ping and compile it yourself...

mrboo at beast:/home/mrboo/ping$ make
Warning: Object directory not changed from original /usr/home/mrboo/ping
cc -O -pipe -march=pentium2 -DIPSEC    -Wsystem-headers -Werror -Wall -Wno-f
ormat-y2k -Wno-uninitialized  -c ping.c
cc -O -pipe -march=pentium2 -DIPSEC    -Wsystem-headers -Werror -Wall -Wno-f
ormat-y2k -Wno-uninitialized   -o ping ping.o -lm -lipsec
bonegzip -cn ping.8 > ping.8.gz
mrboo at beast:/home/mrboo/ping$ ./ping bone
ping: socket: Operation not permitted
mrboo at beast:/home/mrboo/ping$

I just woke up, so it may well be I am just being stupid :o)

> Make your users aware that abusing ping (and other net resources) will get
> them kicked and banned from your system.
> --
>  :{ andyf at
>         Andy Farkas
>     System Administrator
>    Speednet Communications
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to
"freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list