# [SOLVED] how to get ip_conntrack_count ?

## tnt

I've used to read number of ip connections with:

```
sysctl -n net.ipv4.netfilter.ip_conntrack_count
```

but after switching from kernel 2.6.19 to 2.6.21 that is "unknown key"

```
sysctl -n net.ipv4.netfilter.ip_conntrack_count

error: "net.ipv4.netfilter.ip_conntrack_count" is an unknown key

```

is there any other way to count ip connections?

----------

## didymos

That's strange.  I'm running 2.6.21-gentoo-r3, and the key exists here.  Did an option in the netfilter config get accidentally disabled?

----------

## mimosinnet

I have:

```
$ uname -a

Linux mimosinnet 2.6.20-gentoo-r8 
```

```
# grep CONNTRACK /usr/src/linux/.config

CONFIG_NF_CONNTRACK_ENABLED=y

CONFIG_NF_CONNTRACK_SUPPORT=y

# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set

CONFIG_NF_CONNTRACK=y

CONFIG_NF_CONNTRACK_MARK=y

CONFIG_NF_CONNTRACK_EVENTS=y

# CONFIG_NF_CONNTRACK_AMANDA is not set

# CONFIG_NF_CONNTRACK_FTP is not set

# CONFIG_NF_CONNTRACK_H323 is not set

# CONFIG_NF_CONNTRACK_IRC is not set

# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set

# CONFIG_NF_CONNTRACK_PPTP is not set

# CONFIG_NF_CONNTRACK_SIP is not set

# CONFIG_NF_CONNTRACK_TFTP is not set

CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y

CONFIG_NF_CONNTRACK_IPV4=y

CONFIG_NF_CONNTRACK_PROC_COMPAT=y
```

```
# sysctl -a | grep count

net.netfilter.nf_conntrack_count = 3

net.ipv4.netfilter.ip_conntrack_count = 3
```

Cheers!

----------

## arndawg

cat /proc/sys/net/ipv4/netfilter/ip_conntrack_count

----------

## tnt

huh... I'll have to check my .config - guess it's about 'layer 3 independent connection tracking'...

```
cat /proc/sys/net/ipv4/netfilter/ip_conntrack_count

cat: /proc/sys/net/ipv4/netfilter/ip_conntrack_count: No such file or directory

```

----------

## tnt

found this:

```
/proc/sys/net/netfilter/nf_conntrack_count
```

 :Wink: 

thx everybody

----------

