5

I have a cluster of raspberry pi's and I am updating the os from raspian to ubuntu 20.04. I am able to configure a static ip address and name server, but I can not figure out how to disable ipv6. The cloud-init documentation states that dhcp6 is defaulted to false, but my system still shows an ipv6 address on boot. I am new to cloud-init and figuring things out as I go along. Any help would be greatly appreciated.

1
  • 1
    Is the IPv6 address that you get an fe80:: link-local address?
    – chili555
    Commented Apr 30, 2020 at 23:47

1 Answer 1

3

you could do

write_files:
  - path: /etc/sysctl.d/10-disable-ipv6.conf
    permissions: 0644
    owner: root
    content: |
      net.ipv6.conf.eth0.disable_ipv6 = 1
runcmd:
  - systemctl restart systemd-sysctl

to test it without restating:

sudo systemctl restart systemd-sysctl

confirm with:

ip a

and see there is no IPv6 address on the eth0 interface

runcmd is necessary to make the configuration take effect, and is executed after the write_files directive.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .