"nf_conntrack: table full, dropping packet"
The connection tracking table has filled, so new connections are being dropped while existing ones continue.
What you see
New connections fail intermittently while established ones are unaffected. The message appears repeatedly in the kernel log. Common on routers, NAT gateways and busy load balancers.
What is actually wrong
Either genuine load exceeding a default table size that was set for a much smaller machine, or a flood — a scan, a misbehaving client, or an application leaking connections.
Codes and articles
Fixes (2)
Look at what is filling the table
Before raising the limit. Doubling the table for a flood only delays the same failure.
See how full it is and what the limit is.
sysctl net.netfilter.nf_conntrack_count net.netfilter.nf_conntrack_maxcat /proc/sys/net/netfilter/nf_conntrack_count
Find which source addresses hold the most entries.
sudo conntrack -L 2>/dev/null | awk '{print $5}' | sed 's/src=//' | sort | uniq -c | sort -rn | head -20One address holding tens of thousands of entries is a scan or a broken client, and the fix is to block or fix that — not to enlarge the table so it can hold more of it.
Look at the state breakdown. A large number of SYN_SENT entries means connections that are never completing.
sudo conntrack -L 2>/dev/null | awk '{print $4}' | sort | uniq -c | sort -rn | headCheck whether conntrack is even needed for the traffic in question. On a machine that is not doing NAT, tracking can be skipped for high-volume flows with a notrack rule.
sudo nft list ruleset | grep -i notrack
Size the table for the machine
The load is genuine.
Raise the maximum. Each entry costs roughly 300 bytes, so a million entries is around 300MB of kernel memory — budget for it.
sudo sysctl -w net.netfilter.nf_conntrack_max=524288Raise the hash table size to match, or lookups slow down as the table grows.
echo 131072 | sudo tee /sys/module/nf_conntrack/parameters/hashsizeThe recommended ratio is roughly max divided by four. Raising max alone gives a table that holds more entries and takes longer to search each one, which shows up as latency rather than drops.
Shorten the timeout for established connections, which is 5 days by default and holds entries long after the connection is gone.
sudo sysctl -w net.netfilter.nf_conntrack_tcp_timeout_established=86400Make it persistent.
printf 'net.netfilter.nf_conntrack_max = 524288\nnet.netfilter.nf_conntrack_tcp_timeout_established = 86400\n' | sudo tee /etc/sysctl.d/99-conntrack.confsudo sysctl --system
Watch the count under load for a few days before deciding it is enough.
watch -n2 'sysctl net.netfilter.nf_conntrack_count net.netfilter.nf_conntrack_max'Where this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.