Skip to content
This repository was archived by the owner on Feb 12, 2021. It is now read-only.
This repository was archived by the owner on Feb 12, 2021. It is now read-only.

Guide for disabling ipv6 #343

Open
Open
@darethas

Description

@darethas

Hi, I asked the question in irc of how to get the nic to stop assigning an ipv6 address to my machine.

My first attempted solution was to use the cloud config's write_files section and write /etc/netconfig with the ipv6 lines commented out,

write_files:
  - path: /etc/netconfig
    permissions: 0644
    owner: root
    content: |
      udp        tpi_clts      v     inet     udp     -       -
      tcp        tpi_cots_ord  v     inet     tcp     -       -
      #udp6       tpi_clts      v     inet6    udp     -       -
      #tcp6       tpi_cots_ord  v     inet6    tcp     -       -
      rawip      tpi_raw       -     inet      -      -       -
      local      tpi_cots_ord  -     loopback  -      -       -
      unix       tpi_cots_ord  -     loopback  -      -       -

however I was still getting an ipv6 address.

@philips gave an answer in a gist to write a file called 10-disable-ipv6.conf to /etc/sysctl.d/ with the content net.ipv6.conf.eth0.disable_ipv6 = 1

so the cloud-config (or user_data if already installed on bare metal) would look something like this:

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

This issue is per request. He asked if I could file an issue so they could remember to document it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions