CONNTRACKD(8)
CONNTRACKD π
okay bestie, buckle up β this is the conntrackd manual, straight out of section 8 of your friendly neighbourhood Unix docs (that's the sysadmin-commands section, iykyk). It's a whole daemon and she is booked and busy. Let's get into it β¨
πΈ NAME πΈ
conntrackd β the netfilter connection tracking user-space daemon π
β¨ SYNOPSIS β¨
conntrackd [options]
π¦ DESCRIPTION π¦
So conntrackd is the user-space daemon for the netfilter connection tracking system. Her whole job? Synchronizing connection tracking states between several replica firewalls. Which means β and this is the slay part β conntrackd can be used to deploy highly available stateful firewalls. Main character energy fr fr π₯
The daemon supports Primary-Backup and Multiprimary setups, and she can also be used as a statistics collector. Versatile queen π
π OPTIONS π
The options recognized by conntrackd can be divided into two different groups. Two groups, bestie. That's the whole vibe check.
π GEMERAL OPTIONS π
General options for the conntrackd daemon. (yes the original heading says "GEMERAL", we do not fix her, we respect her π)
-dβ Runconntrackdin daemon mode (fork to background). She's leaving the group chat to go do her own thing π-C<path>β Load config file specified in path. Seeconntrackd.conf(5)for details. Gotta read the lore first π-vβ Display version information.-hβ Display help information. Asking for help is self-care, no cap π«Ά
π CLIENT COMMANDS π
conntrackd can be used in client mode to request several information and operations to a running instance of the daemon. So basically you can slide into a running daemon's DMs and ask her stuff π²
-i[ct|expect]β Dump the internal cache, i.e. show local states π-e[ct|expect]β Dump the external cache, i.e. show foreign states π-xβ Display output in XML format. > Heads up: this option is only valid in combination with-iand-eparameters. Don't try it solo, she won't answer π-f[internal|external]β Flush the internal and/or external cache πΏ-F[ct|expect]β Flush the kernel conntrack table. > Ngl, note this: if you use a Linux kernel>= 2.6.29, this option will not flush your internal and external cache. Read the fine print bestie π-cβ Commit external cache to conntrack table. Making it official π-Bβ Force a bulk send to other replica firewalls. With this command, you will askconntrackdto send the state-entries that it owns to others. Sharing is caring β¨-nβ Request resync with other node (only FT-FW and NOTRACK modes).-kβ Kill the daemon π (sorry bestie, sometimes you gotta)-s[network|cache|runtime|link|rsqueue|process|queue|ct|expect]β Dump statistics. If no parameter is passed, it displays the general statistics.- If
networkis passed as parameter it displays the networking statistics. - If
cacheis passed as parameter, it shows the extended cache statistics. - If
runtimeis passed as parameter, it shows the run-time statistics. - If
processis passed as parameter, it shows existing child processes (if any). - If
queueis passed as parameter, it shows queue statistics. - If
ctis passed, it displays the general statistics. - If
expectis passed as parameter, it shows expectation statistics.
- If
-R[ct|expect]β Force a resync against the kernel connection tracking table π-tβ Reset the in-kernel timers (See PurgeTimeout clause) β°
π©Ί DIAGNOSTICS π©Ί
The exit code is 0 for correct function. Errors cause an exit code of 1. She's a simple girl: 0 means we're thriving, 1 means something's off π€
π EXAMPLES π
The following example are illustrative, for a real use in a firewall fail-over, check the primary-backup.sh script that comes with the sources. These are the demo versions, bestie β the real deal lives in that script π
conntrackd -d
Runs conntrackd in daemon and synchronization mode π
conntrackd -i
Dumps the states held in the internal cache, i.e. those handled by this firewall π
conntrackd -e
Dumps the states held in the external cache, i.e. those handled by other replica firewalls π
conntrackd -c
Commits the external cache into the kernel connection tracking system. This is used to inject the state so that the connections can be recovered during the failover. The glow-up moment β¨
π§ DEPENDENCIES π§
This daemon requires a Linux kernel version >= 2.6.18. TCP window tracking support requires >= 2.6.22, otherwise you have to disable it. Helpers are fully supported since >= 2.6.25, however, if you use any previous version, depending on the protocol helper and your setup (e.g. if you setup performs NAT sequence adjustments or not), your help connection may be successfully recovered.
There are several unsupported stateful iptables matches such as recent, connbytes and the quota matches which gather internal information to operate. Since that information does not belong to the domain of the connection tracking system, connections affected by those matches may not be fully recovered during the takeover. > So likeβ¦ those ones might not make it back. Not her fault, it's outside her domain π«
The daemon requires a Linux kernel version >= 2.6.26 to support kernel-space event filtering. Otherwise, all the event filtering is done in userspace with the corresponding extra overhead. If you are not using the Filter clause in the configuration file, ignore this notice. (Ignoring it is valid π
)
π SYSTEMD INTEGRATION π
Starting with the 1.4.4 release, conntrackd includes integration with systemd(1) to use an unit file of Type=notify and watchdog support. She's modern, she's integrated, she talks to systemd directly π
π INCOMPATIBILITIES π
During the 0.9.9 development, some important changes in the replication message format were introduced. Therefore, conntrackd >= 0.9.9 will not work appropriately with conntrackd <= 0.9.8. Not me pointing out the version drama π
This should not be a problem if you use the same conntrackd version in all the firewall replica nodes. Matching fits, matching vibes, periodt π
π SEE ALSO π
π BUGS π
Please, report them to netfilter-devel@vger.kernel.org (subscription required) or file a bug in Netfilter's bugzilla (https://bugzilla.netfilter.org). Do NOT suffer in silence bestie, tell the devs π
π AUTHORS π
Pablo Neira Ayuso wrote and maintains the conntrackd tool π«Ά
Man page written by Pablo Neira Ayuso <pablo@netfilter.org>.
and that's the whole page, babes π this one's from Apr 16, 2018, CONNTRACKD(8), and it lives in the conntrack-tools sources. go forth and keep those firewalls highly available, you absolute icon πβ¨
π¦ where this page comes from
- alpine 3.22: conntrack-tools-doc 1.4.8-r0 Β· GPL-2.0-or-later
- alpine 3.23: conntrack-tools-doc 1.4.8-r0 Β· GPL-2.0-or-later
- alpine 3.24: conntrack-tools-doc 1.4.9-r0 Β· GPL-2.0-or-later
- arch rolling: conntrack-tools 1.4.9-1 Β· GPL-2.0-or-later
- centos-stream 10: conntrack-tools 1.4.8-5.el10 Β· GPL-2.0-only
- centos-stream 9: conntrack-tools 1.4.7-4.el9 Β· GPLv2
- debian bookworm: conntrackd 1:1.4.7-1+b2 Β· GPL-2.0-or-later
- debian trixie: conntrackd 1:1.4.8-2 Β· GPL-2.0-or-later
- fedora 43: conntrack-tools 1.4.8-10.fc43 Β· GPL-2.0-only
- fedora 43: conntrack-tools 1.4.9-2.fc43 Β· GPL-2.0-only
- fedora 44: conntrack-tools 1.4.8-12.fc44 Β· GPL-2.0-only
- nixos 26.05: conntrack-tools 1.4.8
- nixpkgs unstable: conntrack-tools 1.4.9
- opensuse-leap 16.0: conntrackd 1.4.8-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: conntrackd 1.4.8-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: conntrackd 1.4.8-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: conntrackd 1.4.8-160000.2.2 Β· GPL-2.0-or-later
- ubuntu jammy: conntrackd 1:1.4.6-2build2 Β· GPL-2.0-or-later
- ubuntu noble: conntrackd 1:1.4.8-1ubuntu1 Β· GPL-2.0-or-later
- ubuntu questing: conntrackd 1:1.4.8-2
- ubuntu resolute: conntrackd 1:1.4.9-1 Β· GPL-2.0-or-later
- ubuntu stonking: conntrackd 1:1.4.9-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms