Hi there,
As the title says, I'm having trouble pinging localhost, specifically, pinging localhost when I'm not connected to a network.
When I try it keeps telling me the operation is not permitted:
Code:
matt@mubuntu:~$ ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
But if I connect to the network, start pinging then disconnect it continues pinging.
Google seems to think it could be something to do with my iptables setup:
Code:
matt@mubuntu:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Or my routes:
When connected to network
Code:
matt@mubuntu:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
When not connected to network
Code:
matt@mubuntu:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
But as far as I can tell there isn't anything in there which would stop me connecting to the localhost (I also can't connect to my local apache instance when offline)...
I'm at a loss as to what to do, does anyone have any ideas as to what I'm doing wrong.
(It's worth mentioning that a couple of weeks ago I had the pc setup to share it's internet connection with a laptop, ala this guide, however I've since disabled the iptables rules and disabled ip forwarding.)
Bookmarks