I've looked through a bunch of similar posts but none solve my problem nor match my conditions.

I have connected my pi to my local network. I can reach the internet (google) but for some reason I cannot reach web pages hosted by my local machines on the same network.

It has something to do with resolving the host name with the local DNS server. when using 'nslookup' on a select host name it resolves the address and gives me the IP of the DNS server and the target server.

But if I try to ping the target host name I get "Unknown host..." Also if i try to ping the DNS server i get "icmp open socket: Operation not permitted"

So I am perplexed how can nslookup resolve completely but ping fail completely?

Also other machines on the network have no problem accessing eachother. And if i use the IP in the web address instead of the hostname the page displays just fine (just not when resolving pages from other machines). There is no whitelisting going on on our DNS server with exception to MAC address reservation which ive done.

  • To help further can you edit your question and include the following : the contents of /etc/resolv.conf and the output of ifconfig Jan 8, 2016 at 16:35

2 Answers 2


The reason for your problem is due, most likely, the way your network interface is connected.

Usually the default 'dns server' is your own router; in this case, the router will take care to resolve public and local names. Local names are captured by your router during the DHCP IP address assignment (or similar protocol). Routers, acting as DHCP Servers, add a private suffix to local host names like: 'host.home', 'host.vendor' etc, often too, your dhcp server provides this information back to you.

If you manually edited /etc/resolv.conf to use a public or any external DNS, like google's or, you will have no information about local machines, unless you use other protocols to find them like 'avahi', the obsolete 'wins', 'netbios' etc.

Ping operation "icmp open socket: Operation not permitted" is a security issue, maybe using sudo will work.

If you can edit your question and add Raspbian version and release (wheezy, Jessie) (cat /etc/*-release | grep VERSION=), also cat /etc/os-release, ifconfig, route and cat /etc/resolv.conf will help further more.


The simplest solution would be to add the local machines to the /etc/hosts file.

you can add an entry like the following for each local machine:

192.168.x.x nameoflocalmachine alias

where the first column contains the IP address of machine and the second is the hostname or fully qualified domain name. You can add additional aliases for the machine separated by a space to the end of the line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.