LXC (Ubuntu) Disable IPv6

r371769

Member
Feb 23, 2020
9
0
6
57
Hi,

I want to disable IPv6, because I want to setup samba as actice directory service. For this it's needed to disable IPv6.

How can I disable the LXC container to get any IPv6 adress?

regards
Frank
 
You can config samba to use IPv4 only.
Code:
interfaces = your.ipv4.network.address
bind interfaces only = Yes

But if you insist in disabling IPv6 at SO level
I think you could edit /etc/sysctl.conf (not tried yet)
Bash:
$ sudo nano /etc/sysctl.conf
   # add these lines at bottom
    net.ipv6.conf.all.disable_ipv6 = 1 
    net.ipv6.conf.default.disable_ipv6 = 1 
    net.ipv6.conf.lo.disable_ipv6 = 1
Save and close, reboot.

A possible caveat is that if you plan to use X Forwarding through ssh, disabling IPv6 can break it.
Also if you're using postfix, also will fail.
You'll have to point to your IPv4 loopback
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!