Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable ipV6 in Google Chrome (version 45)?

I recently updated Chrome on my developer machine to v45. This update seems to set my client Ip to always use IpV6. Some of the applications I am developing locally require me to use Ipv4 so I need to disable Ipv6 on chrome. I tried solutions mentioned in

Is there a way to disable IPv6 in Google's Chrome?

but that doesn't seem to resolve my problem.

like image 874
KnightFox Avatar asked Sep 02 '15 17:09

KnightFox


2 Answers

Short answer

The Chrome's method for resolving names (async-dns) is ignoring the OS's IPv4/IPv6 precedence.

You can try to launch Chrome from the console with the flag --disable-async-dns but, obviously, you'll loose that functionality.

Long answer

There are two reasons because you can't disable IPv6 in Chrome:

  • Google is not providing anymore the option to deactivate IPv6 since 1149303005.
  • Your OS must implement the "policy table" described in RFC3484. With it you should be able to give IPv4 precedence for all applications, inclunding Chrome. Nevertheless, Chrome is not working as expected: there is a known issue 516305 not fixed.

So you must disable "async dns" or you have to hack it out of Chrome, for example:

  • Using the etc/hosts file.
  • Choose (or deploy) an IPv4-only DNS and configure it in your OS's network configuration.
  • Install a web proxy with IPv6 disabled, then configure Chrome for using it.
like image 133
jac Avatar answered Sep 20 '22 15:09

jac


If you are on windows, you can add the ipv4 address and the hostname to the hosts file (located: c:\windows\System32\drivers\etc\hosts). Then the browser does not look up the dns to get the ip address but uses the ip address that you have provided in the hosts file.

On ios/mac the hostfile is located here: /private/etc/hosts

like image 24
Bo Pennings Avatar answered Sep 20 '22 15:09

Bo Pennings