create new tag
, view all tags

Opera Doesn't Work After DNS Change (Mandriva2006)

Keywords / Phrases / Alternate Titles (for search--add some):

  • After DNS (or related) changes, opera thinks pages are unavailable, konqueror and mozilla work fine (except maybe as far as blocking ads--see below)

email (will be) sent to:




After making some changes in my home network (LAN) that required (surprisingly to me) a change of DNS servers (and for my convenience, a change in the ip address for the LAN's Internet gateway), opera would not work, yet konqueror and mozilla worked fine (with the possible exception of ad blocking--I might or might not confirm this sometime in the future).

After too much experimentation and investigation, I found that the cause of the problem (from my point of view) is that the Mandriva Linux Control Center, in my words, "mangled" the contents of the /etc/hosts file. Konqueror and mozilla-firefox seemed to tolerate this mangling, whereas opera did not.

I'm sending this to both a Mandriva list and an Opera list to make people aware of the problem. IMHO, the root cause of the problem is Mandriva's aggressive editing of the /etc/hosts file--their editing should be much less intrusive. (As I am using Mandriva 2006, perhaps this has already been addressed in later versions of Mandriva?)

There are other contributing factors to the problem (discussed below), but, as stated above, I think the problem is the Mandriva Linux Control Center's overly aggressive modification of the /etc/hosts file.

I have seen references to problems like this on various Opera resources (e.g., forums, mail lists)--it seems that at least in some cases, a resolution for the problem was never found (or at least not documented). I don't know if those problems also involved Mandriva or if other Linux distros have a similar problem.

Main (Re)Source

This was the page that gave me the information I needed. (Why couldn't I find that first instead of last? wink

More Description of the Problem

This is on my Mandriva2006 machine (s14).

After switching ISPs (and from dial-up to broadband ;-), and setting up a new Internet gateway on my home network), I found that Opera no longer worked but other browsers (konqueror, mozilla-firefox) did.

The symptom on Opera is that, for any page I attempted to load, I got an error like:

Network problem

You tried to access the address http://www.google.com/, 
which is currently unavailable. Please ...


By starting opera at the command line with the option -debugdns, I found that neither IPv6 nor IPv4 lookup were working (i.e., it's a DNS problem):

dns: Resolving 'www.google.com'
dns: Thread created
dns: Trying IPv6 lookup for host 'www.google.com'...
dns: gethostbyname failed with return value 34 (Numerical result out of range). hostent pointer:(nil)
dns: Trying IPv4 lookup for host 'www.google.com'...
dns: gethostbyname failed with return value 34 (Numerical result out of range). hostent pointer:(nil)
dns: Thread completed with error code 3

After a fair amount of experimentation and investigation (googling, searching Opera mail lists and knowledge base, and eventually finding, I found the problem and the root cause.

Root Cause

The root cause is this: When changing certain items in the Mandriva Linux Control Center ("Alter miscellaneous internet settings" and "Reconfigure a network interface" (maybe others??)), Mandriva edits the /etc/hosts file rather aggressively. After that editing, apparently konqueror and mozilla-firefox can deal with the file but Opera cannot. (keep reading)

Other relevant information: I have modified my /etc/hosts file to use Mike Skallas' Ad Blocking Hosts file, which adds known domains of advertisers to the hosts file with an IP of This blocks the ads. (At least, it did--some advertiser's have found ways around this which I won't mention here in the faint hope that some advertisers will not discover those ways.)

Before Mandriva's aggressive (I was looking for another word--can't think of it at the moment--words I've found with a thesaurus, but still not what I'm looking for: obtrusive, intrusive, presumptuous) editing of the file, it has over a thousand lines like this: www.doubleclick.net ad.doubleclick.net #remove this for atomfilms problems ad.preferences.com ads.doubleclick.com ads.infospace.com ads.msn.com ads.switchboard.com doubleclick.net ads.doubleclick.net

Something in the Mandriva (2006) scripts associated with the Mandriva Linux Control Center rewrites those lines so that all of those adserver's domains are on one extremely long line prefixed by, i.e., something like this:      s14.home s14 localhost #this is not an ad server this is your PC www.doubleclick.net ad.doubleclick.net #remove this for atomfilms problems ad.preferences.com ads.doubleclick.com ads.infospace.com ads.msn.com ads.switchboard.com doubleclick.net ads.doubleclick.net ad2.doubleclick.net ad3.doubleclick.net ad4.doubleclick.net ad5.doubleclick.net ad6.doubleclick.net ad7.doubleclick.net ad8.doubleclick.net ad9.doubleclick.net .................

For whatever reason(s), this mangled /etc/hosts file does not cause a problem for konqueror or mozilla-firefox (at least the versions shipped with Mandriva 2006), but does cause a problem for Opera. (I'm using Opera Version 8.5; Build 1358; Platform Linux; System i686, 2.6.12-12mdk--I don't think this is the version of Opera that came with Mandriva 2006, I vaguely recall downloading and installing this later / separately, but seeing the "2.6.12-12mdk" makes me wonder if my vague recollection is correct).

Note: Although konqueror and mozilla-firefox seem to tolerate that change (i.e., they continue to load pages despite that change), I haven't done any investigation to determine whether the file still achieves the goal of blocking ads. (This is for a variety of reasons--I see ads in any case because of the workarounds that advertisers have found, and, now, knowing that this is the problem for Opera, I've switched the hosts file back to the unmangled form and, at least atm, don't have time to experiment with the mangled form.)

Aside: You could argue that the changes suggested by Mike Skallas are the root cause of the problem and should not be done, but I see those as a practical solution to an (originally) unanticipated problem (the excessive use of advertising on the Internet).


  • Restore the original (not mangled) /etc/hosts file.


  • In the future, make changes such as this directly to the relevant files (/etc/hosts and /etc/resolv.conf). I.e., don't use the Mandriva Linux Control Center to make DNS and similar changes (changing the gateway IP address, by itself, caused the same mangling of the /etc/hosts file).

Suggested (preferred, imho) fix

IMHO, I would recommend that Mandriva not edit the /etc/hosts file as aggressively as they do in Mandriva 2006 (maybe this has already been addressed in later versions of Mandriva?).

It might be nice if Opera could handle the "mangled" form of the hosts file, as konqueror and mozilla-firefox seem able to do (but note that I have not confirmed that konqueror and mozilla-firefox still block ads as intended by the extensive modifications made to the /etc/hosts file based on Mike Skallas' Ad Blocking Hosts webpage.

Other Opera users have had the same problem

I have seen other (potential?) Opera users' posts about this on the various Opera forum or mail lists, for example:

I don't know if they are running Mandriva or not, or if their problem is a result of a "mangled" /etc/hosts file or something else.

A Mandriva Problem Report, no resolution posted

' Replace eth0, with the correct nic id. See if that makes any difference.. '

Same problem may exist in Ubuntu

Here's a hint that the same (or a similar) problem exists in [K?]Ubuntu

' This works fine until I run network-admin for anything. Run sudo network-admin, and click OK (to exit). The /etc/hosts file is now completely mangled. '

Asides (other learnings or issues)

  • Why does RCN not allow me to use fast.net nameservers, yet fast.net allowed me to use openDNS nameservers--will I have a problem with RCN if I want to use the openDNS nameservers?

  • I found that I had to restart Opera to get new DNS addresses to take effect, while with konqueror they took effect immediately on changing the /etc/resolv.conf file. (I didn't do nearly as much testing with mozilla-firefox, as my primary browser is konqueror, and the first backup (for pages konqueror can't handle) is Opera.)

  • The man opera page does not reference startup options like -debugdns. Note also that another startup option recommended somewhere in the opera lists, "-pd" (perhaps requiring a filename parameter), did not work at all.

Other problems that might be confused with this

' It looks like the infamous DNS/DHCP problem, try forcing the DNS servers (use only one, remove the router address supersede domain-name-servers;) by editing dhclient.conf , see this post:


If it doesn't work, try a static ip. Some other tips here: http://my.opera.com/community/forums/topic.dml?id=195450 '

' To test this assumption, try echo 0 > /proc/sys/net/ipv4/tcp_window_scaling as root. If this fixes things, there is a firewall or NAT box between you and the destination machine that's badly broken, and that's deliberately breaking TCP for you; you will have to accept lower TCP bandwidth, and higher latencies for interactive work."

Other useful tips for opera

  • As described above, note the location of your profile\opera6.ini file.
  • (Optional) Run Tools > Delete private data to clear your cache and cookies.
  • Close Opera completely.
  • Delete the profile\opera6.ini file.
  • Start Opera again.


  • () Main.RandyKramer - 05 May 2008
  • If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your TWiki.WikiName.

Revision Comment

  • %DATE% —

Page Ratings

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2008-05-05 - RandyKramer
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look