Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a little problem with sysctl on a Ubuntu 10.04 LTS system.

When I set the sysctl values with "sysctl -w " all work fine, but when I try to use the sysctl.conf file. the net settings will be ignored.

For example my sysctl.conf

# /etc/sysctl.conf - Configuration file for setting system variables

kernel.domainname=findme.sysctl 

# Corefiles information 
fs.suid_dumpable=2 
kernel.core_pattern=/cores/core-%e-%s-%u-%g-%p-%t

##############################################################3
# Functions previously found in netbase

net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait=1
net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait=1

when I grep to the values, I can see that the sysctl settings for net.ipv4.netfilter don't set.

[host:~ ] $ sysctl -a | grep domainname
kernel.domainname = findme.sysctl

[host:~ ] $ sysctl -a | grep "core_pattern"
kernel.core_pattern = /cores/core-%e-%s-%u-%g-%p-%t

[host:~ ] $ sysctl -a | grep "timeout_fin_wait"
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 120
net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait = 120

[host:~ ] $ sysctl -a | grep "timeout_close_wait"
net.netfilter.nf_conntrack_tcp_timeout_close_wait = 60
net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait = 60

can somebody help me to solve the problem?

If you need more information I can post it.

Cheers,

Steffen

share|improve this question
    
Setting such a short value for nf_conntrack_tcp_timeout_{close,fin}_wait will make almost every conntrack/ state rule useless. The defaults are 60 and 120 respectively. Such a low value make it impossible to track established connections as these will be marked as "new" very soon. –  Lekensteyn Sep 10 '12 at 14:34
add comment

1 Answer

When I set the sysctl values with "sysctl -w " all work fine, but when I try to use the sysctl.conf file. the net settings will be ignored.

You should run sysctl -p for the effects to take change after editing sysctl.conf

From sysctl man page:

-p: Load in sysctl settings from the file specified or /etc/sysctl.conf if none given.

share|improve this answer
    
yes I know, this was a example that I can set this values... But thank you... I found a little syntax problem in my file and look if it work now ... –  Steffen Unland May 31 '12 at 9:57
    
@SteffenUnland Did this helped actually? –  pl1nk Jun 20 '12 at 23:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.