Skip to contentSkip to conversation

ip_conntrack: table full, dropping packet.

DISCUSSION Vicky Shrestha 4 participants 5 messages Oct 30, 2002 – Nov 1, 2002

lore
Share & tools
lore
#0 lore raw

I have built a firewall on 2.4.8-17 kernel which has 2 Mb of traffic going in an out of it.

I recently added a line :
iptables -A FORWARD -m state --state ESTABLISED,RELATED -J ACCEPT

Now I can see the lines "ip_conntrack : table full, dropping packet" in my kern.log.

Does dropping packets means that it is actually dropping the packets or just truncating the file /proc/net/ip_conntrack , does this affect my client's connections???

Signature · 7 lines
Best regards,


Vicky Shrestha
System Administrator
WorldLink Communications Pvt.Ltd
Jawalakhel, Kathmandu, Nepal.
#1 lore raw
Quoted 6 lines · Vicky Shrestha

I have built a firewall on 2.4.8-17 kernel which has 2 Mb of traffic going in an out of it.

I recently added a line :
iptables -A FORWARD -m state --state ESTABLISED,RELATED -J ACCEPT

Quoted 6 lines

Now I can see the lines "ip_conntrack : table full, dropping packet" in my kern.log.

Does dropping packets means that it is actually dropping the packets or just truncating the file /proc/net/ip_conntrack , does this affect my client's connections???

It means it really is dropping packets. You should find out why the
conntrack table is too small and do something about it.

The two possible reasons are:

1. You have a reasonable sized conntrack table but something is creating large numbers of entries (maybe SYN floods or something similar).

2. You have a reasonable number of connections being created through the machine, but insufficient memory has been allocated to the conntrack table.

Questions:

1. How much memory do you have in your firewall machine ?

2. What are the results of:
wc -l /proc/net/ip_conntrack
cat /proc/sys/net/ipv4/ip_conntrack_max

Antony.

Signature · 1 line
Your email has been returned due to insufficient voltage.
#2 lore raw
In reply to Vicky Shrestha
Quoted 2 lines

Now I can see the lines "ip_conntrack : table full, dropping packet" in my kern.log.

Yes, but have you read the FAQ ? :) Guess not.
You need to increase the /proc/net/ip_conntrack_max value, according to the FAQ, it gives some reasonable values depending on the RAM you have.

Quoted 3 lines

Does dropping packets means that it is actually dropping the packets or just truncating the file /proc/net/ip_conntrack , does this affect my client's connections???

Well, it means that the state mechanism has no space to insert a conntrack entry, meaning, that the --state ESTABLISHED,RELATED works only to a limited number of currently tracked connections.

Depending on your setup, it may do different things, but most probably it does whatever your POLICY instructs them to do. DROP ? Most certainly.

In other words, it means that the --state rule will not match on the packet. It will not get accepted by this rule.

Regards,
Maciej Soltysiak

#3 lore raw

Yes I have read the FAQ .

I have 512 Mb of Ram and Hence the Maximum value of /proc/sys/net/ipv4/ip_conntrack_max must be 32768, which is what I have set already.

But Even this value is not enough for the connection passing through the firewall. It gets maxed out with minutes

If I increase the value what negative effect does it have??? Can I increase it to say 3276800 ???? Hope It doesnot crash my machine.

Quoted 23 lines · Maciej Soltysiak
Quoted 2 lines

Now I can see the lines "ip_conntrack : table full, dropping packet" in my kern.log.

Yes, but have you read the FAQ ? :) Guess not.
You need to increase the /proc/net/ip_conntrack_max value, according to the FAQ, it gives some reasonable values depending on the RAM you have.

Quoted 3 lines

Does dropping packets means that it is actually dropping the packets or just truncating the file /proc/net/ip_conntrack , does this affect my client's connections???

Well, it means that the state mechanism has no space to insert a conntrack entry, meaning, that the --state ESTABLISHED,RELATED works only to a limited number of currently tracked connections.

Depending on your setup, it may do different things, but most probably it does whatever your POLICY instructs them to do. DROP ? Most certainly.

In other words, it means that the --state rule will not match on the packet. It will not get accepted by this rule.

Regards,
Maciej Soltysiak

Signature · 7 lines
Best regards,


Vicky Shrestha
System Administrator
WorldLink Communications Pvt.Ltd
Jawalakhel, Kathmandu, Nepal.
#4 lore raw

No I guess the maximum value is 64K.

Yes. It did crash my machine.
Just FYI, I tried this before on my 64M RAM linux box.
The default is 4K connection max.
But I tried to increase it to 64K.
End up when the number of connections grow to 13K (based on /proc/net/ip_conntrack),
it first starts killing my other processes including klogd, syslog-ng, snort.
At this time, you can see the kernel start killing the process from your syslog (before syslog died)
After a while my linux box hang. And wait for reboot
I guess this is related to OOM (out-of-memory) bug in the kernel (I'm using 2.4.18-xfs).

.//Jet

Quoted 2 lines

If I increase the value what negative effect does it have??? Can I

increase it

Quoted 3 lines

to say 3276800 ???? Hope It doesnot crash my machine.