I’ve tried everything I could find on permanently disabling IPv6. This page says to edit /etc/default/grub (then update grub and reboot). OK. Did that. And:
cat /etc/default/grub | grep ipv6
Returns:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
Great! Should be disabled now! Nope.
ip -6 addr
Returns:
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 fe80::e654:e8ff:fe0b:52c9/64 scope link
valid_lft forever preferred_lft forever
This page (supposedly specific to Ubuntu Server 22.04) says to add
net.ipv6.conf.all.disable_ipv6 = 1
$ net.ipv6.conf.default.disable_ipv6 = 1
$ net.ipv6.conf.lo.disable_ipv6 = 1
to /etc/sysctl.conf then apply the changes and restart the network service. Did that. Then this command is supposed to prove that IPv6 is disabled:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
When it returns “1” (which it does). But still…
ip -6 addr
Returns
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 fe80::e654:e8ff:fe0b:52c9/64 scope link
valid_lft forever preferred_lft forever
I tried rebooting. Still got the same output from ip -6 addr
What am I doing wrong? More importantly, how do I make it right?