To disable the IPv6 address for your Ubuntu or Debian Droplet, open the /etc/netplan/50-cloud-init.yaml
file using nano
or your preferred text editor:
nano /etc/netplan/50-cloud-init.yaml
The 50-cloud-init.yaml
file contains all of the configuration information for the Droplet’s network interfaces. Comment out the Droplet’s IPv6 address in the addresses
field of the eth0
interface:
/etc/netplan/50-cloud-init
network:
version: 2
ethernets:
eth0:
accept-ra: false
addresses:
# - 2001:DB8:1:1::7/64
- 203.0.113.7/24
- 198.51.100.12/24
Next, run the following command to apply the updated configuration.
To disable the IPv6 address for your Fedora Droplet, open the /etc/NetworkManager/system-connections/cloud-init-eth0.nmconnection
file using vi
or your preferred text editor:
vi /etc/NetworkManager/system-connections/cloud-init-eth0.nmconnection
vi
opens files in a read-only mode by default. To edit a file in vi
, switch to insert mode by pressing the i
key.
Once you are done editing the file, press the Esc
key to exit insert mode. Then type :wq
and press Enter
to save and quit the file.
The cloud-init-eth0.nmconnection
file contains all of the configuration information for the Droplet’s eth0
network interface. Under the [ipv6]
section, comment out the address1
and route1
fields in the file, as shown below:
/etc/NetworkManager/system-connections/cloud-init-eth0.nmconnection
[ipv6]
method=auto
may-fail=true
# address1=2001:DB8:1:1::7/64
# route1=::/0,2001:DB8:1:1::1
To disable the IPv6 address for your CentOS Droplet, open the /etc/sysconfig/network-scripts/ifcfg-eth0
file using vi
or your preferred text editor:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
vi
opens files in a read-only mode by default. To edit a file in vi
, switch to insert mode by pressing the i
key.
Once you are done editing the file, press the Esc
key to exit insert mode. Then type :wq
and press Enter
to save and quit the file.
The /etc/sysconfig/network-scripts/ifcfg-eth0
file contains all of the configuration information for the Droplet’s eth0
network interface. Comment out the IPV6ADDR
field containing the Droplet’s IPv6 address, as shown below:
/etc/sysconfig/network-scripts/ifcfg-eth0
AUTOCONNECT_PRIORITY=120
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0
GATEWAY=203.0.113.1
HWADDR=6a:b0:bc:ae:73:1c
IPADDR=203.0.113.7
IPADDR1=198.51.100.11
# IPV6ADDR=2001:DB8:1:1::7/64
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6_DEFAULTGW=2001:DB8:1:1::1
IPV6_FORCE_ACCEPT_RA=no
MTU=1500
NETMASK=255.255.255.0
NETMASK1=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no