LXC disable ipv6

9acca9

Well-Known Member
Dec 27, 2017
33
3
48
73
Hi
I need to disable ipv6 on a Centos 7 container. But... i cant.
If i modify the /etc/hosts proxmox overrride my config.

How can i disable ipv6?? (im using squid proxy in this container and this make me problems with ipv6))

I dont speak english, thanks to all!
 
just set net.ipv6.conf.all.disable_ipv6=1 in /etc/sysctl.conf. Maybe you need to change wildcard addresses in daemons as well to get everything back into a working condition.
 
Hi.
This /etc/sysctl.conf, is the file in the container??? or in proxmox?
If i do that in the container, ipv6 is not disable, i keep seeing ::1 in /etc/hosts, and i cant commented.
Thanks
 
This /etc/sysctl.conf, is the file in the container??? or in proxmox?

Depends on what level you want to disable IPv6. If you only want to disable it in the container, then the container is sufficient.

If i do that in the container, ipv6 is not disable, i keep seeing ::1 in /etc/hosts, and i cant commented.

You have to check ip or ifconfig if it is disabled, not /etc/hosts.
 

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!