Current version of Opera browser doesn't obey etc/hosts file for domains outside the local network. It looks to me like it is using its own DNS resolver.

For example if I create the following entries in hosts file: stackoverflow.com  #IPv4 example
::1 www.stackoverflow.com    #IPv6 example

then Firefox, IE and network tools like ping evaluate stackoverflow.com as localhost ( but Opera still visits real stackoverflow.com (even after restart).

I view this behavior as unsecure and annoying, as system-wide list of unwanted (dangerous or intentionally blocked) sites is ignored by the browser. Is there a way how to make Opera browser obey the content of etc/hosts file?

  • 3
    Do you have Turbo mode on? If you do - read somewhere how it works. That will explain everything. – Kamil Sep 7 '14 at 11:07
  • 1
    @Kamil - you are right, it was caused by Turbo. (Initially I couldn't locate its visual indication and on/off switch.) Please add this as the answer and I'll accept it. – miroxlav Sep 7 '14 at 11:14

There is Turbo mode in Opera, I guess you have it turned on.

When it is turned on - browser may ignore your local DNS configuration.

How does Opera Turbo work?

The technology behind Opera Turbo is a proxy server with server-side compression of webpages. A compression rate of up to 80% can be achieved, in part by reducing the quality of images.

Source: link

  • Thank you. Just a note that the sentence "When it is turned on - browser is not using local DNS configuration." is true only partially because for servers not found in Opera's own DNS, entries in file etc/hosts remain in effect. – miroxlav Sep 7 '14 at 12:12
  • Oh, I didn't knew that! Thanks. Ill fix my answer. – Kamil Sep 7 '14 at 12:27
  • Too bad that unlike in older Opera versions, Turbo has no visual indication. Of course, there is Opera Turbo menu item in Opera main menu, but if the item is checked, it only means that Turbo is requested where possible. But if you visit www.youtube.com which is NOT covered by Opera Turbo, you have no chance to see that Turbo is not in use. Then you might be wondering why for www.youtube.com Opera obeys etc/hosts and why for www.stackoverflow.com it doesn't... – miroxlav Sep 8 '14 at 9:06
  • I don't like how they changed Opera. It was one of a kind, very customisable, it was something diffrent, alternative and now... it become "just another browser". I thought they removed Turbo functionality totally, but it looks like it's still there :) – Kamil Sep 8 '14 at 22:38

I haven't got Turbo turned on but I still had this problem. I found the following superuser post that solved my problem: Why is Chromium bypassing /etc/hosts and dnsmasq?.

Adapting the answer from that post I did the following:

1) In a new tab in Opera I entered the following URL: opera://net-internals/#dns;

2) On the page I clicked the Clear host cache button.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.