NeoKiKi
(Julien)
September 28, 2022, 2:34pm
1
Hello,
I want to totally disable ipv6 in my Home Assistant (hassio through VM)
I disabled ipv6 in settings (system/network/ipv6/disabled) but HA is still using ipv6 on my network interface (enp0s3)
I disabled ipv6 on enp0s3 through SSH using nmcli command :
nmcli connection modify Supervisor\ enp0s3 ipv6.method “disabled”
It works, it disable ipv6 but… if I restart my VM ipv6 is back again
Do you have any idea to totally disable it ?
Many thanks !
jarmohi
(Jarmo Hiljanen)
October 19, 2022, 6:24pm
2
Hi!
That is exactly the same problem I have currently. My HA drops from cloud every day.
Any new information how to fix this?
wmaker
(Tommy Long)
October 20, 2022, 7:13pm
3
I played around some, but ended up only re-confirming your findings.
I did a test using the nmcli command you mentioned, and I looked inside
/etc/NetworkManager/system-connections/Supervisor\ enp0s3.nmconnection
and it shows the ipv6 entries:
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=disabled
But after a reboot, the method changed to link-local
.
I don’t really know why. AFAIK a modify on a connection profile is suppose to persist.
Zimbakin
(Zimbakin)
October 21, 2022, 1:31am
4
+1 to this issue here. My HA drops out every 40 minutes or so. Today I can’t connect at all.
Was fix or work around found?
SamBGB
(Samuel)
March 8, 2023, 5:12pm
6
Would be interested to know this too.
The only thing I can suggest is seeing if you can disable IPv6 on whatever you’re using for a router, if it supports that.
Also, if you’re on a Supervised version of Home Assistant, you can got to settings/config/network and disable IPv6 in there.
NeoKiKi
(Julien)
March 8, 2023, 5:54pm
8
You can’t disable IPV6 on some router and… unfortunately that’s my case
Like I said in original post, IPV6 is already disabled in settings (settings/config/network) but it doesn’t seem to really disable it
1 Like
taich
(Thomas Aichinger)
April 15, 2023, 9:56pm
9
This command did the job.
nmcli connection modify <connection_name> ipv6.method ignore
To check if ipv6 is permanently disabled you can
cat /etc/NetworkManager/system-connections/<connection_name>
There you should find method=ignore
stfn82
(Steef)
June 1, 2023, 6:04pm
10
This won’t survive a reboot either.
Did anyone find a permanent solution?
Johnny51
(John Manz)
January 19, 2024, 9:03pm
11
I’m wondering if I can find a spot in the startup to insert the command so it happens at the end of the boot process. I’ll let you know if I figure it out.
dproffer
(David Proffer)
January 19, 2024, 10:52pm
12
I don’t use Hassio, rather just run the Home Assistant docker container in a Ubuntu VM on Proxmox. That said, the following modification to the linux kernel boot line disables IPV6 for the VM.
‘disabled ipv6 using this:’
In this tutorial, we show the step by step instructions to disable IPv6 temporarily or permanently on Ubuntu 22.04 Jammy Jellyfish Linux.
Est. reading time: 2 minutes
sudo -s
vi /etc/default/grub
FROM:
GRUB_CMDLINE_LINUX_DEFAULT=""
TO:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
sudo update-grub
sudo sync
sudo reboot
wmaker
(Tommy Long)
March 11, 2024, 6:29pm
14
Just to confirm, it did survive a reboot?
JPZV
(JPZV)
April 2, 2024, 11:08pm
15
Sadly Hassio (VM) doesn’t have the /etc/default/grub
file, nor the update-grub
command, so this is not straight forward.
BUT, there’s a way to do it:
Edit the Grub config file:
vi /mnt/boot/EFI/BOOT/grub.cfg
Find the default_cmdline
variable (it’s near the end, at ~83% of the file)
At the end, add the following before the closing quote:
ipv6.disable=1
For example: (DON’T COPY THESE, as your default_cmdline
may vary and would leave your system unusable)
#Before
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 systemd.machine_id=$MACHINE_ID fsck.repair=yes $boot_condition"
#After
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 systemd.machine_id=$MACHINE_ID fsck.repair=yes $boot_condition ipv6.disable=1"
After that, just reboot
and then check with ip addr
Just note that this will disable IPV6 entirely and might make some issues in HA as clearly HASSIO wasn’t prepared to have IPV6 disabled system-wide
NathanCu
(Nathan Curtis)
April 2, 2024, 11:17pm
16
For instance, Matter support doesn’t happen without IPV6…
2 Likes