Knowledgebase

Portal Home > Knowledgebase > Articles Database > Ping local not work


Ping local not work




Posted by CleberDantas, 02-11-2010, 10:22 PM
Hello. My linux DEBIAN LENNY x64 not ping localhost and local IP. Ping external is Ok. External servers ping my server normal. I no have firewall in this server. Sugestion?

Posted by mugo, 02-12-2010, 12:02 AM
More info would be helpful...you can't ping "localhost", did you try 127.0.0.1? You may not have the entry in your hosts file. When you say "Pink external is OK", you mean you can ping things FROM the server, or you can ping the server FROM the 'net? If you just can't ping localhost, check your /etc/hosts file and make sure the line 127.0.0.1 localhost is there.

Posted by CleberDantas, 02-12-2010, 07:24 AM
Hello. In ssh in my server no is possible ping localhost, 127.0.0.1 and public ip 200.222.0.x ; If i ping aol.com , etc ping work normal From others servers is possible ping my public ip 200.222.0.x This is problem: In ssh of my debian, no ping my local ips.

Posted by VIPoint, 02-12-2010, 09:42 AM
Try adding the following lines in the /etc/hosts file. 127.0.0.1 localhost

Posted by FrankLaszlo, 02-12-2010, 11:07 AM
It wouldnt be a host files issue, if he is not able to ping 127.0.0.1. Does it give you a permission denied error? What is the output of:

Posted by mugo, 02-12-2010, 12:15 PM
Correct...it would also be good to actually see the results of a ping. Do you actually have a loopback interface setup? (ifcfg-lo) and is it up? Also, check your sysctl.conf and see if you have net.ipv4.icmp_echo_ignore_all=0 If you are not running as root while pinging, it may be Selinux....is that set to enforcing?

Posted by FrankLaszlo, 02-12-2010, 12:22 PM
Ah, completely forgot about selinux. Good call. But I'd imagine he wouldnt be able to ping ANYTHING if that was the case. I'm more weighing towards a default iptables policy thats blocking ICMP.

Posted by RoseHosting, 02-12-2010, 04:16 PM
Is this a physical or virtual server? What is the output of 'cat /etc/hosts' command?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Possibly hacked? (Views: 535)


Language:

Contact us