Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I detect which setting in the OS X could block ping localhost? IPFW, LittleSnitch no such rules?

Update 1:

> cat /etc/hosts
127.0.0.1   localhost
255.255.255.255   broadcast
share|improve this question
    
Are you asking hypothetically what could block a ping or are you saying you are having this problem and need to know how to fix it? –  tubedogg Aug 25 '13 at 19:44
    
I have this problem. I have localhost over IPv6, but I need to have it over IPv4 (i.e. 127.0.0.1) –  static Aug 25 '13 at 19:46
    
Can you please add the content of your /etc/hosts file? –  patrix Aug 25 '13 at 20:12
add comment

2 Answers

Most likely it's your Mac OSX Firewall.

Go to System Preferences / Security & Privacy / Firewall and see if it's on. If it is, turn it off for a moment and see if you can ping localhost (please note, before you can turn the Firewall off, you'll need to click on the padlock in the bottom left corner and authenticate).

Don't leave your Firewall off though, unless you're absolutely sure that your Mac is not exposed to any external traffic at all (i.e. it's really only safe to do that when you're in a completely isolated network). The procedure above is to verify that it is the Firewall and not something else that's blocking the ICMP traffic to localhost.

share|improve this answer
    
sounds logically. the problem is System Preferences get stuck if I go to Security & Privacy. Do you know something about this symptom? –  static Aug 25 '13 at 20:22
    
How do you mean "it gets stuck"? Does it display anything? do you get a spinning beach ball? What exactly does it do? You can also open Console.app and see if there's anything saved into the log while the System Preferences "gets stuck". One more idea is to open Activity Monitor and see what's happening there - does it become unresposive? can you sample the process and see if it tries to read a file or something? –  mike Aug 25 '13 at 20:25
    
I mean spinning beach ball and (Not Responding). In the Console.app: System Preferences: httpdEnabled is deprecated !! –  static Aug 25 '13 at 20:31
    
OK. Not sure about that, to be honest... You can try enabling and disabling the firewall in command line. Have a look at superuser.com/questions/472038/…. –  mike Aug 25 '13 at 20:41
add comment

The obvious choice would be if stealth mode were on. That blocks pings to localhost on all my Mac OS systems. Go to System Preferences, Security & Privacy, Firewall, Firewall Options...

Firewall options

Also, if you have "Block all incoming connections" that might also affect things. I would certainly turn off LittleSnitch since it also can and will block that sort of traffic if you haven't allowed it.

share|improve this answer
add comment

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.