Skip to content

Instantly share code, notes, and snippets.

@Snawoot
Created January 1, 2025 13:05
Show Gist options
  • Save Snawoot/235152c53e93546e0313ab59106e3611 to your computer and use it in GitHub Desktop.
Save Snawoot/235152c53e93546e0313ab59106e3611 to your computer and use it in GitHub Desktop.

From LinuxBender @ HN

Create /etc/modprobe.d/nf_conntrack.conf:

options nf_conntrack expect_hashsize=256400 hashsize=256400

And then in /etc/sysctl.conf:

# from /etc/sysctl.conf: increase state table limits.
# Requires 1/4 mem to hash table plus 400 overhead because I am the cargo culting king:
# cat /etc/modprobe.d/nf_conntrack.conf
# options nf_conntrack expect_hashsize=256400 hashsize=256400
net.nf_conntrack_max = 1024000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment