After reboot debian box ignore sysctl.conf values

Where is right place for sysctl redefined values?

I have:

> uname -a
Linux note 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64 GNU/Linux

> cat /etc/debian_version 
wheezy/sid


> tail -n 2 /etc/sysctl.conf   
#
net.ipv6.bindv6only=0

But after each reboot net.ipv6.bindv6only still 1


Solution 1:

Check if there is a file in /etc/sysctl.d with your parameter. These files override the /etc/sysctl.conf file...

Solution 2:

https://bugs.launchpad.net/ubuntu/+source/procps/+bug/50093

/etc/init.d/procps.sh comes too early in the boot process to apply a lot of sysctl's. As it runs before networking modules are loaded and filesystems are mounted, there are quite a lot of commonly-used sysctl's which are simply ignored on boot and produce errors to the console.

All documentation on the net referring to changing certain settings in /etc/sysctl.conf such as net.ipv4.netfilter.ip_conntrack_max is wrong for Ubuntu & Debian.

Finally, "It seems to me it is a Debian Squeeze bug, see here for an example and workaround: http://wiki.debian.org/BridgeNetworkConnections

In the latter case, the procps init script should take care of loading them during boot. However, on Squeeze it does not, and you need to restart it from /etc/rc.local (or similar):

# /etc/rc.local

# Load kernel variables from /etc/sysctl.d
/etc/init.d/procps restart

exit 0

Solution 3:

If you use ufw (uncomplicated firewall) you really need to change the values in /etc/ufw/sysctl.conf as the configuration here overrides /etc/sysctl.conf one.