LXC disable ipv6

9acca9

Well-Known Member
Dec 27, 2017
39
3
48
75
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.