Problem with ping (open socket: Operation not permitted)
After few search I found setcap
and :
setcap cap_net_raw=ep $(which ping)
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).