How can I disable IPv6 on Digital ocean droplet?

I followed the directions in the tutorial “How To Enable IPv6 for DigitalOcean Droplets”. I’ve decided not to use IPv6 with this droplet and would like to disable it.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @digitalocean718

Since you haven’t noted what OS you’re using, so I’m guessing it’s Ubuntu/Debian. Go and edit this file /etc/network/interfaces. And remove the IPv6 section that looks similar to this and then reboot the server:

iface eth0 inet6 static
        address primary_ipv6_address
        netmask 64
        gateway ipv6_gateway
        autoconf 0
        dns-nameservers 2001:4860:4860::8844 2001:4860:4860::8888

It’s not possible to remove the “IPv6” nor “Private Networking” from the droplet via the control panel after it’s been activated. But by removing the configuration, we actually disable the functionality completely.

Why would you want to?

The easiesed way I found how to do this is to shut down your droplet, take a snapshot of it and create a new droplet from the snapshot. In the creation process, don’t select the IPv6 option. DO agent will also take care of unconfiguring the old IPv6 address in the OS since it has to touch the network config anyways to configure the new private IP.

Obviously you want a floating IP to avoid any disruptions for this.