Previously, when installing apps using Helper Scripts, I often turned off the IPv6 feature because I didn’t need to use it. But now that my home network supports IPv6, I need to re-enable IPv6 for LXC Container.
1. Enable IPv6 for Debian LXC
Check IPv6
ip addr | grep inet6
Code language: Nginx (nginx)
If no results are displayed, IPv6 is disabled.
Edit this file
nano /etc/sysctl.conf
Code language: Nginx (nginx)
Scroll down to the bottom, if you see the line net.ipv6.conf.all.disable_ipv6 = 1
then delete it and save it.
Restart LXC with command reboot
Now check again with command ip addr | grep inet6
a series of results will appear.
inet6 ::1/128 scope host noprefixroute
inet6 2405:6587:xxxx:yyyy:be24:11ff:feee:b784/64 scope global dynamic mngtmpaddr
inet6 fe80::be24:11ff:feee:b784/64 scope link
inet6 fd7a:115c:a1e0::5001:a610/128 scope global
inet6 fe80::e100:2cd1:2da:c9a/64 scope link stable-privacy
inet6 fe80::42:9ff:fe28:332c/64 scope link
inet6 fe80::42:13ff:feac:de49/64 scope link
inet6 fe80::42:55ff:fece:14d6/64 scope link
inet6 fe80::600b:90ff:fee7:de2b/64 scope link
inet6 fe80::787b:fff:fe28:f77a/64 scope link
inet6 fe80::8084:7eff:fedd:9b0d/64 scope link
inet6 fe80::508b:d4ff:feaa:7f5b/64 scope link
inet6 fe80::80b9:e3ff:fe40:9f22/64 scope link
Code language: PHP (php)
In which line number 2 is the Public IPv6 of this LXC.
inet6 2405:6587:xxxx:1300:yyyy:11ff:feee:b784/64 scope global dynamic mngtmpaddr
Code language: PHP (php)
2. Enable IPv6 for Ubuntu LXC
Check IPv6
ip addr | grep inet6
Code language: Nginx (nginx)
then only Local IPv6 appears
inet6 ::1/128 scope host
inet6 fe80::be24:11ff:fee3:cd74/64 scope link
Code language: PHP (php)
Edit file /etc/systemd/network/eth0.network
change the value of the item IPv6AcceptRA
from false
wall true
(Match)
Name = eth0
(Network)
Description = Interface eth0 autoconfigured by PVE
Address = 192.168.0.206/24
Gateway = 192.168.0.1
DHCP = no
IPv6AcceptRA = true
Code language: YAML (yaml)
Create 1 more file .pve-ignore.eth0.network
to prevent Proxmox from automatically changing the value IPv6AcceptRA
become again false
every time LXC starts.
touch /etc/systemd/network/.pve-ignore.eth0.network
Code language: Nginx (nginx)
Restart LXC
reboot
Checked again, IPv6 is showing up fine.
inet6 2405:6587:xxxx:yyyy:be24:11ff:fee3:cd74/64 scope global dynamic mngtmpaddr noprefixroute
Code language: PHP (php)
Reference: No IPV6 for LXC containers | Proxmox Support Forum
Comment Policy: We truly value your comments and appreciate the time you take to share your thoughts and feedback with us.
Note: Comments that are identified as spam or purely promotional will be removed.
To enhance your commenting experience, consider creating a Gravatar account. By adding an avatar and using the same e-mail here, your comments will feature a unique and recognizable avatar, making it easier for other members to identify you.
Please use a valid e-mail address so you can receive notifications when your comments receive replies.
2 comments
Your writing has a way of resonating with me on a deep level. I appreciate the honesty and authenticity you bring to every post. Thank you for sharing your journey with us.
Thank you so much for your heartfelt comment! 🌟 It truly means a lot to know that my writing resonates with you. Honesty and authenticity are essential ingredients in any creative endeavor, and I’m grateful that they come through in my posts.
Writing is a journey—a way to explore thoughts, emotions, and experiences. And sharing that journey with readers like you makes it all the more rewarding. So, from the bottom of my writer’s heart, thank you for being part of this adventure! 📝✨
If there’s anything specific you’d like me to delve into or explore further, feel free to share—I’m always eager to connect and learn together. Cheers to more meaningful words and shared moments! 🙌📚