# Host Resolution

## MJGdaishi

I've recently set up a server running Gentoo. My plan is to set up web serving on it as well, however, When I boot to the kernel and attempt to emerge apache, I am hit with the 'unable to resolve host address' error. I've tried pinging google and ping returns that www.google.com is an unknown host. My resolv.conf contains: *Quote:*   

> # Generated by dhcpcd for interface eth0
> 
> search ph.cox.net
> 
> nameserver 68.105.28.11
> ...

  I'm wondering if it's something that I have failed to configure in my kernel. I'm able to emerge packages from the minimal install environment (even when I chroot into my own) As far as I know I have everything set up correctly. But then again. maybe I'm not seeing the specific tree from the forest. any Ideas as to what I need to post to help trouble shoot this error?

----------

## Hu

What is the output of dig www.google.com @68.105.28.11?  You may need to emerge --noreplace net-dns/bind-tools first.

----------

## MJGdaishi

 *Hu wrote:*   

> What is the output of dig www.google.com @68.105.28.11?  You may need to emerge --noreplace net-dns/bind-tools first.

 

-bash: dig: command not found

Is the reply I get from inside my installation. I'll reboot with the disc and emerge the tool as well as bind-tools and try again from within my install.

----------

## MJGdaishi

I recieve 

Digs version XXX 

global _____ +cmd

connection to server timed out

Anyways, Along those lines, I don't remember the entire output of the command and I figure I might as well try again with a current minimal install disc. So I will wipe the disc and try again.  :Very Happy:  We'll see how that goes.

----------

## Princess Nell

@Hu: <nitpick>I would dig for www.google.com.</nitpick>

It is more helpful to cut and paste the actual command result than describing it.

I get a result for "dig www.google.com. @68.105.28.11", you get "connection to server timed out". Something in your network is blocking DNS queries - it could be a local iptables firewall, or a router, or a firewall. For DNS resolution to work, any such devices need to allow connections to destination port 53 udp and tcp.

----------

## chithanh

If you cannot emerge because your DNS doesn't work, you can put an entry for distfiles.gentoo.org in /etc/hosts manually.

----------

## Hu

 *Princess Nell wrote:*   

> @Hu: <nitpick>I would dig for www.google.com.</nitpick>

 Technically, yes, the name should have a trailing dot.  However, the default options for dig do not use the search list, which should be equivalent to specifying a trailing dot.

----------

## wcg

Look at /etc/conf.d/net and /etc/conf.d/net.example. There was something

about an explicit resolver setting stomping on resolv.conf. (Commented out

by default, IIRC.)

Even that is not it, there may be something in there that illuminates

the problem.

----------

