LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



Reply
 
Search this Thread
Old 08-05-2008, 08:59 AM   #1
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Rep: Reputation: 32
Unhappy [Resolved] Web browsing fails to load correct URL, ignores /etc/hosts!! Daily issue


I'm at a loss. Please help. It is at the point that my internet experience is unusable.


Every day when I try to load a common set of URLs, I get Feedburner pages instead, or another site. This happens with Firefox (actually Iceweasel) and Konqueror both, on Debian Lenny with KDE (and on previous Kubuntu 7.10 and 7.04 installations).

Screenshot here of three misloads: http://picpaste.com/dns_issues.png

For example, if I visit... // I might get...
www.nytimes.com // bbc.co.uk
www.nytimes.com // "Feedburner: HTTP Status 400 - You must provide a feed uri"
www.tuxmachines.org // "Feedburner: HTTP Status 400 - You must provide a feed uri"
slashdot.org // del.icio.us
del.cio.us // bbc.co.uk

Note these are examples that change slightly every day, but overall there are pretty much always issues with NYTimes.com, Slashdot.org, and TuxMachines.org, and I often get that Feedburner page.

I was using OpenDNS but I changed that to my ISP's default nameservers; no fix. I removed OpenDNS from my DSL modem and from my network switch also. I've added the ips of tuxmachines.org in my /etc/hosts file and that is *completely ignored* by both of my web browsers -- it was this way in my old Kubuntu days also. I do not have Bind installed. I've tried rebooting. My nameserver listed in /etc/resolv.conf is from 192.168.1.1, my DCHP-enabled router.

From the command line with 'host' or 'whois' , names/ips are resolved just fine. Using 'Links' (cli browser) also results in the wrong websites being displayed however -- tuxmachines.org brings up again the Feedburner failure page.

Any ideas, anyone?

Last edited by lefty.crupps; 08-11-2008 at 03:02 PM.
 
Old 08-05-2008, 12:50 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,121

Rep: Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819
No browser I know of looks in /etc/hosts for anything, so that's most likely not your problem -- it's most likely a DNS problem.

You should have one or more numeric addresses of name servers; your /etc/resolv.conf file ought to look something like
Code:
search com
nameserver nnn.nnn.n.nn
nameserver nnn.nnn.n.nn
This is, the nameserver entries should be numeric, not alphanumeric.

Routers, even if they provide DNS, tend not to update or search and you can have this sort of problem; i.e., you can count on a server, you can't really count on a router.

Your ISP should provide one or more nameserver addresses or, if not, there are a large number of public servers available (Google is a good place to look for a couple).

Hope this helps some.
 
Old 08-05-2008, 01:52 PM   #3
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Original Poster
Rep: Reputation: 32
My /etc/resolv.conf has:
nameserver 192.168.1.1
which is the router, which was pointing to OpenDNS but is now pointing to the internet DSL modem; the DSL modem was also pointing to OpenDNS but it is now getting the nameservers from my ISP.

So basically it should be hopping from one to the next until it gets to the ISP nameservers, correct?

The Windows machine on our network is getting its nameservers from the same method and has no issues, and never has (of this nature).

If I manually assign the nameservers in /etc/resolv.conf will they be wiped out at next reboot, due to DHCP addressing?

Last edited by lefty.crupps; 08-05-2008 at 01:56 PM.
 
Old 08-05-2008, 01:54 PM   #4
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Original Poster
Rep: Reputation: 32
and why wouldn't a webbrowser look at the hosts file??

that seems somewhat madness first off, since it is the easiest method for statically assigning names and IPs; second, it does function this way with my work iceweasel when testing webserver setups that don't have DNS set up yet...
 
Old 08-05-2008, 02:38 PM   #5
rajwinder
LQ Newbie
 
Registered: Jun 2008
Posts: 21

Rep: Reputation: 15
well web browser definitely looks for /etc/hosts file for name resolution if no proxy is not used ..
 
Old 08-05-2008, 03:10 PM   #6
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,121

Rep: Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819
Look for your inet1.conf file in /etc (mine is in /etc/rc.d, but yours may be located somewhere else). There is a line it that contains the string DHCP_KEEPRESOVLV; you can set that to "yes" so DHCP won't overwrite it. Then you can set your nameserver in /etc/resolv.conf to a real address and see what happens. For example, try the address your ISP gave you. You can do this without rebooting or anything, just find a real DNS address or two and stick 'em in resolv.conf as above.

This is a heck of a lot easier than trying to walk up to a router and modem and hope they work (which, obviously, they ain't or you wouldn't be asking, eh?). Your ISP gives you a DNS address or two? Use 'em!

Edit: here's a few public DNS servers http://www.tech-faq.com/public-dns-servers.shtml

Last edited by tronayne; 08-05-2008 at 03:29 PM.
 
Old 08-11-2008, 03:01 PM   #7
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Original Poster
Rep: Reputation: 32
Talking

I have resolved this issue (although not how I was hoping for) by adding the nameservers that I want to use at the end of my /etc/dhcp3/dhclient.conf file:

Code:
prepend domain-name-servers 208.67.222.222,208.67.220.220;
I would have preferred that the computer was getting its nameservers from my router but this above fix did make everything work well for over a week now, and also survives reboots.

This was a Debian Lenny install, by the way, for future readers.

Thank you all for your help!
 
  


Reply

Tags
dns, domain, ipaddress, url


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C code to daily read the free online journals on the web frenchn00b General 1 01-10-2008 02:19 PM
correct config of Hosts file ankycooper Red Hat 1 06-15-2006 02:07 AM
Can I route web traffic to 2 different hosts based on URL under 1 IP Address? Marshalle Linux - Networking 5 05-14-2005 04:02 AM
konqueror not browsing web (it is not the typical file association issue) KimVette Linux - Software 3 05-07-2005 03:52 AM
Correct entry for local machine in /etc/hosts Kropotkin Linux - Networking 1 11-16-2004 06:41 PM


All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration