I have such trouble when using
ping 127.0.0.1 under root:
ping: icmp open socket: Operation not permitted
What does it mean? When I try
ls -l /bin/ping it says:
-rwsr-xr-x 1 root root 30788 Jul 27 2010 /bin/ping
I'm using Debian GNU/Linux 5.0
You might have an
iptables rule preventing pings from getting to localhost (this is entirely possible with iptables).
The following will clear all
iptables rules. Do this cautiously because
iptables is used to implement firewalling on Linux, so you are effectively disabling your firewall.
iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT iptables -P FORWARD ACCEPT iptables -F iptables -X
This could happen if your route table is messed up, I believe, as well. Give us the output of
route if the above leads nowhere.
The only other thing I can think of is that you have
lo, the localhost "virtual network adapter", involved in some weird bridging configuration with another adapter. But this is highly unlikely (but you can use
brctl to check).