# [SOLVED] Firefox cannot access some sites

## denaje

The problem: For some sites (a consistent but annoyingly large set), Firefox displays the message: "Server not found Firefox can't find the server at xxxx".

For example: I can access forums.gentoo.org, but I cannot access gentoo.org. This behavior is always consistent across reboots.

I am not sure where the problem lies because of these facts:

1. It only occurs at my current internet connection (at home), not at any other internet connection

2. It only occurs on my Gentoo desktop (other computers on the same internet connection are able to access the sites just fine)

3. It only occurs in Gentoo (not my dual-boot Windows)

4. It only occurs in Firefox (Konqueror works fine, but Firefox on other machines works fine as well. The problem also persists among several versions of Firefox.)

So I'm guessing it's most likely a Firefox problem, but it may also be a Gentoo problem, and I thought I'd give it a shot on the forums here since they've been so helpful in the past.

I am using:

Kernel 2.6.29-r5x86_64 GentooFirefox-bin 3.5.1

I have tried renaming/moving my ~/.mozilla directory, but that did not solve the problem. The problem exists on mozilla-firefox and mozilla-firefox-bin (64 bit and 32 bit, respectively). My /etc/hosts file has nothing but the default localhost lines in it. I figured it might be a DNS problem, but I'm not well versed in that area.

Any ideas? Is there any more info I can provide that would be of more use?Last edited by denaje on Fri Jul 24, 2009 2:37 pm; edited 1 time in total

----------

## civilian

To check if it is a DNS problem try editing /etc/resolv.conf.

My DNS servers' (iBurst in SA) IP is 196.2.97.234 and 196.46.70.10, but I'm not sure if you would be allowed to connect from the outside.

----------

## cach0rr0

gotta be careful with south african DNS servers, a mere sneeze occupies the entire country's bandwidth  :Smile: 

Spot on though, this is DNS

you can use the following publically reachable/accessible DNS servers if nothing else as a test

```

nameserver 4.2.2.2

nameserver 208.67.222.222

nameserver 208.67.220.220

```

add those lines above any existing nameserver lines in /etc/resolv.conf

then close Firefox completely, but do not restart eth0 (or whichever interface you use)

then re-open it, and see if your issue persists 

If that seems to fix things, you could look at using them on a more permanent basis either by configuring your DHCP server to push them out, or, if using static set something similar to the following in /etc/conf.d/net

```

dns_servers_eth0="4.2.2.2"

```

----------

## civilian

True about SA bandwidth. Also iBurst's systems might give you different problems, so rather try more reliable DNS servers.

According to /etc/resolv.conf, you can also permanently add the nameserver lines to /etc/resolv.conf.head and /etc/resolv.conf.tail, but I have not tested it yet.

----------

## denaje

Yep, that was exactly the problem. I tried cach0rr0's temporary fix, and it worked. I also tried using my router's DNS information, and it works too.

Now the question is about a more permanent fix. Are you saying that the problem is my router not providing the DNS information to the client? I see an option for obtaining DNS information automatically, but nothing about providing DNS nameservers to clients. Is this something I configure in the router or in Gentoo? (It's a DHCP setup, not static addresses.)

----------

## civilian

Actually, I think the DNS server is the problem. I learned of this kind of problem when my ISP's DNS servers were giving problems.

If you're using DHCP then your router should set itself as the DNS server, and then just forward any DNS request to its DNS server.

In my case DHCP sets my resolv.conf to 192.168.0.1.

Try setting it in /etc/resolv.conf.head or /etc/conf.d/net.

If you can afford it, you can try waiting, since the DNS server should get fixed at some point.

----------

## denaje

 *civilian wrote:*   

> Actually, I think the DNS server is the problem. I learned of this kind of problem when my ISP's DNS servers were giving problems.
> 
> If you're using DHCP then your router should set itself as the DNS server, and then just forward any DNS request to its DNS server.
> 
> In my case DHCP sets my resolv.conf to 192.168.0.1.
> ...

 

Huh. Before, my resolv.conf was set to the ip of my router, and I would have thought that it would forward the DNS requests. But this problem has been going on for months (I just haven't been home in a while), and when I set the nameservers in resolv.conf to the nameservers the router receives, it works. So could this be a problem with the router?

Also, I do not have an /etc/resolv.conf.head. I'll try configuring it in /etc/conf.d/net, but will this break when I move to a new internet connection?

----------

## civilian

 *Quote:*   

> and when I set the nameservers in resolv.conf to the nameservers the router receives, it works.

 

I missed that part. It might be the router then.

resolv.conf.head is a file that you need to create yourself.

The script that generates resolv.conf will check for the head and tail file, and add them to the appropriate places in resolv.conf (There's a commented line in resolv.conf that says head comes here).

----------

## cach0rr0

all routers are different i suppose, but on mine - Linksys WRT54GS - you can tell it which DNS servers to push out via DHCP. 

On mine I use what I've mentioned above. 

Of course, I do a bit of cheapie content filtering for DHCP clients since I have my nieces and nephews over occasionally, so I need a way to bypass OpenDNS (208.67.22x.22x) for myself. 

To do this:

laptop01 logs # cat /etc/dhcp/dhclient.conf

```

send host-name "laptop01.whitehathouston.com";

supersede host-name "laptop01.whitehathouston.com";

prepend domain-name-servers 4.2.2.2;

```

----------

## denaje

Thanks, I think I got it figured out. As far as I could tell, resolv.conf.head is only used by dhcpd, not dhclient (which is what I use). I added a 

```
prepend domain-name-servers xxx.xxx.xxx.xxx
```

 statement to /etc/dhcp/dhclient.conf, and dhclient is now inserting those nameservers into resolv.conf.

Thanks for your help everyone!

----------

