Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I understand that on Linux I do:

// allow
echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all
// block
echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all

// permanent block (edit /etc/sysctl.conf)
net.ipv4.conf.icmp_echo_ignore_all = 1

But what about on my Mac Mini OSX Server?

share|improve this question
    
Why in the world do people block ping and traceroute? ._. –  grawity Jun 25 '13 at 21:30
    
Ask the admins of microsoft.com –  AnonymousLurker Jun 25 '13 at 23:41
    
@AnonymousLurker, lol. –  Ryan Jun 26 '13 at 3:10

1 Answer 1

up vote 1 down vote accepted

ipfw should do the trick for you:

sudo ipfw -f add deny icmp from any to any in

It worked on my 10.6.8 installation, anyhow.

Alternatively you could turn on Stealth Mode as described here: http://support.apple.com/kb/ht1810

share|improve this answer
    
I ran this on my server and then tried to ping it remotely (ping server.name) and it pinged just fine. Do I need to restart or logout to activate the change? After your command above it read: 65534 deny icmp from any to any in –  Ryan Jun 25 '13 at 21:23
    
No, it should be instantaneous. Perhaps there is an earlier rule which was explicitly allowing it? Can you grab your existing firewall rules related to icmp and post them here? Like sudo ipfw list |grep icmp –  Nate from Kalamazoo Jun 25 '13 at 21:26
    
What was the output of sudo ipfw list |grep icmp ? –  Nate from Kalamazoo Jun 25 '13 at 21:26
    
12309 allow icmp from any to any icmptypes 8 and 12310 allow icmp from any to any icmptypes 0 –  Ryan Jun 25 '13 at 21:27
    
There you go - that rule explicitly allows icmp traffic, so the denial rule never gets hit. Try sudo ipfw delete 12309 and then sudo ipfw -f add deny icmp from any to any in again, and see what happens. –  Nate from Kalamazoo Jun 25 '13 at 21:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.