5

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:

127.0.0.1 stackoverflow.com  #IPv4 example
::1 www.stackoverflow.com    #IPv6 example

then Firefox, IE and network tools like ping evaluate stackoverflow.com as localhost (127.0.0.1) 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?

miroxlav
  • 14,845

2 Answers2

3

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

Kamil
  • 2,686
2

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.

Simon Elms
  • 1,025