# how to change nf_conntrack_max value.....

## dashang

i want to change nf_conntrack_max  value....

i have search in google. i find out that to change the value of nf_conntrack_max ...

/sbin/sysctl -w net.netfilter.nf_conntrack_max = 196608

but its give me error...

```
[root@manage /root]# /sbin/sysctl -w net.netfilter.nf_conntrack_max = 196608

error: "net.netfilter.nf_conntrack_max" must be of the form name=value

error: Malformed setting "="

error: "196608" must be of the form name=value

```

please tell me how to change value of max conntrack ....

----------

## taho

Hi dashang

Just remove blank symbols before and after  = sign

sysctl -w net.netfilter.nf_conntrack_max=196608

----------

## dashang

thanx sir its workinggg.....

one more problem is there...i got error when i set buckets..

```

[root@manage /root]# /sbin/sysctl -w net.netfilter.nf_conntrack_buckets=196608

error: permission denied on key 'net.netfilter.nf_conntrack_buckets'

```

my question is  nf_conntrack_buckets and nf_conntrack_max ....can be equal?????

or its depends on ram size....

its create confusion to understanding nf_conntrack_max and nf_conntrack_buckets....

i want to improve my server performance because some times its give conntrack is full...server have 4gb ram

----------

## taho

hi

net.netfilter.nf_conntrack_buckets depends on RAM as the nf_conntrack_max and i don't recommend you to use such increased values. You can get uncontrolled state of host via network.

I don't know max value for nf_conntrack_buckets in your case (4G) but i believe it must be more lesser than nf_conntrack_max, not equal

sorry for my english.

----------

