sysctl isn't working properly

gilgameshfreedom

Active Member
Feb 26, 2015
1
0
41
Hi!

Here is my problem, I had installed Proxmox 3.4 and wanted to disable IPv6 via sysctl. I have added in sysctl.conf the following lines:

Code:
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
net.ipv6.conf.eth0.disable_ipv6=1
net.ipv6.conf.vmbr0.disable_ipv6=1
net.ipv6.conf.venet0.disable_ipv6=1

But if I reboot the Proxmox, I will see that IPv6 is working:
Code:
root@proxmox:~# sysctl -A 2>/dev/null | egrep disable | egrep ipv6
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.vmbr0.disable_ipv6 = 0
net.ipv6.conf.venet0.disable_ipv6 = 0

If I run sysctl manually, IPv6 will be disabled:
Code:
root@proxmox:~# sysctl -p
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.vmbr0.disable_ipv6 = 1
net.ipv6.conf.venet0.disable_ipv6 = 1

Why sysctl setting doesn't apply in the boot process?