disabel IPv6 Ubuntu 22.0 Cloud Image

Pampa Party

Member
Apr 26, 2023
53
3
13
Hi,

i tried following without succes:

1.
Code:
nano /etc/sysctl.d/99-sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

2.
Code:
sudo nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable=1"

sudo update-grub

3.
Code:
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

4. tried to use nmcli but i probably lacking of knowledge here as well.

5. Other things i can´t remember

If anybody could help me out here would be lovely, cause im starting to questioning my life.

LG
 
Did you reboot the machine after you made those changes? What's the output of:

Code:
sysctl -a | grep -F 'net.ipv6.conf.all.disable_ipv6'
ip addr
 
yes i rebooted, but always had and still have a ipv6 adress. i checked it with
Code:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
Result was always 0, also i see in the proxmox gui for the vm the ipv6 adress
 
Okay. Can you recursively search for this just to see if something is overriding your previous settings? Note the inclusion of 'R'.

Code:
grep -RF 'net.ipv6.conf.all.disable_ipv6' /etc/sysctl*
 
Okay. Can you recursively search for this just to see if something is overriding your previous settings? Note the inclusion of 'R'.

Code:
grep -RF 'net.ipv6.conf.all.disable_ipv6' /etc/sysctl*

grep -RF 'net.ipv6.conf.all.disable_ipv6' /etc/sysctl*
/etc/sysctl.conf:net.ipv6.conf.all.disable_ipv6 = 1
/etc/sysctl.d/99-sysctl.conf:net.ipv6.conf.all.disable_ipv6 = 1