IPv6
Network

[Proxmox] Enable IPv6 for Debian / Ubuntu LXC

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 inet6Code language: Nginx (nginx)

If no results are displayed, IPv6 is disabled.

Edit this file

nano /etc/sysctl.confCode 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 inet6a 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 inet6Code 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.networkchange 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 = trueCode 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.networkCode 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.

Related posts

Triple Boot Hackintosh macOS Sonoma – Windows 11 – EndeavorOS Linux

Mark Lee

Configure Dynamic DNS via Cloudflare using Docker Compose

Mark Lee

[INSTRUCTIONS] Configuring Dynamic DNS on Mikrotik Router

Mark Lee

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More