Disable IPv6 Privacy

From Luna Node
Revision as of 13:50, 19 August 2015 by Favyen Bastani (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Ubuntu and some other operating systems have IPv6 privacy extensions enabled by default. This extension will cause outgoing IPv6 connections to fail when using the default network. To disable IPv6 privacy in Ubuntu, edit /etc/sysctl.d/10-ipv6-privacy.conf and set both fields to 0, like this:

net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0

Then run sysctl -p /etc/sysctl.d/10-ipv6-privacy.conf to reload the configuration.

Note: Ubuntu templates on Luna Node Dynamic were configured to disable IPv6 privacy extension by default on 17 August 2015. Virtual machines created after that time do not need reconfiguration.

You may additionally wish to prefer IPv4 for outgoing connections over IPv6. To perform this update in Debian/Ubuntu, edit /etc/gai.conf and uncomment the line that looks like this:

#    For sites which prefer IPv4 connections change the last line to                                                                                                                                               
#                                                                                                                                                                                                                  
precedence ::ffff:0:0/96  100