# DNS Lookup failure on some websites

## Turtleggjp

I just finished doing a new Gentoo install on my old Core2 Duo system.  During the install, I had some issues with it not being able to download all of the source packages that it needed.  It seemed to have a problem resolving distfiles.gentoo.org.  I eventually got around this issue by adding a bunch of mirrors to my /etc/portage/make.conf file.  Now that I have built KDE 4.8.3 and also installed Firefox, I am again finding that some websites work just fine, while others it cannot find.  A good example is Yahoo: 

```
www.yahoo.com
```

works just fine but,

```
mail.yahoo.com
```

does not.

Something strange definitely happened about a year ago when I replaced my DSL modem.  As soon as I did, my Gentoo system was unable to resolve any website addresses.  The Gentoo LiveDVD also had the same problem (and still does to this day).  Strangely, some other distros' live discs (like Ubuntu and Mint) do not have this problem.  Windows machines on the same network also do not have any problems.  I was able to get around this by adding the DNS server addresses reported by the DSL modem to my /etc/resolv.conf file (using /etc/resolv.conf.tail to append them every time I start the system).  I did the same thing on the new install, and it does help since without it I get nothing.  However there are still some addresses not working correctly (almost seems to be sites that do not start with www).  Any ideas what might be wrong?

Matt

----------

## ali3nx

Some routers have a feature that will "proxy" dns requests through your router or modem instead of allowing a common nat translation. This feature is actually bad to use and why commercial network hardware vendors add this feature i'll both never agree with or understand as proxying dns is not how dns is designed to work. 

dhcp servers should assign dns servers to end client nodes not a proxy. There's dozens of long convoluted documents about this in general networking theory that any network engineer is forced to understand that's not easy to completely explain. One of the devious benefits of having such a setup is being able to enforce dns hyjacking.

If you have this feature enabled you would see your router or modem as your dns server. If there's any way to disable this feature if that is the case i would recommend doing so and adding public dns servers to your dhcp records. 

This may not be a complete solution to your issues but it's worth checking out.

----------

## PaulBredbury

Try suggestions in thread.

I always recommend to use BIND on the Linux PC.

----------

## Turtleggjp

Ok, after adding those public DNS servers listed in that thread, it seems to be working now.  Paul, what do you mean by "BIND?"

The IP that gets put into /etc/resolv.conf by dhcp is that of my DSL modem, not the router.  The way things are set up now, my router and all the computers on the network get addresses of 192.168.2.*, while my DSL modem has an address of 192.168.1.254.  Could that also be what causing the problem?  Though I would think that such a problem would prevent me from pulling up the DSL modem's web interface, which I am able to do.

Thanks!

----------

## PaulBredbury

Just google it.

Run the "route" command to see your routing.

----------

## Turtleggjp

This is the new system:

```
Matt-Gentoo-2012 turtleggjp # route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         192.168.2.1     0.0.0.0         UG    3      0        0 eth0

loopback        localhost       255.0.0.0       UG    0      0        0 lo

192.168.2.0     *               255.255.255.0   U     3      0        0 eth0
```

This is my existing system (on the same LAN):

```
Matt-Gentoo Documents # route 

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.2.0     *               255.255.255.0   U     202    0        0 eth0

loopback        *               255.0.0.0       U     0      0        0 lo

default         192.168.2.1     0.0.0.0         UG    202    0        0 eth0
```

Everything look normal?

----------

## PaulBredbury

Your new loopback doesn't look right to me.

I have on my PC (not Gentoo):

```
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
```

Set up by:

```
ifconfig lo 127.0.0.1 netmask 255.0.0.0 &&

route add -net 127.0.0.0 netmask 255.0.0.0 dev lo
```

Does "ping localhost" work? With a localhost entry in /etc/hosts also, of course.

----------

