NFCT(8)
π NFCT(8) β the connection tracking glow-up π
okay so bestie, say hi to nfct β it's the command line tool that lets you configure the Connection Tracking System. yes, the whole thing. from your terminal. iconic behaviour honestly. π¦
β¨ SYNOPSIS β¨
nfct command subsystem [parameters]
that's it, that's the shape of it. a command, then a subsystem, then whatever parameters you're feeling. π
πΈ DESCRIPTION πΈ
nfct is the command line tool that lets you configure the Connection Tracking System. lowkey it's the little remote control for your conntrack setup and it ate. π₯
π COMMANDS π
listβ lists the objects that already exist. a little show-and-tell. πaddβ adds a new object. new object, who dis. β¨deleteβ deletes an object. bye bestie π«Άgetβ gets an existing object. grabby hands, but make it sysadmin. πflushβ flushes the accounting object table. yes, all of it. gone. πdisableβ this one is for the helper subsystem. it lets you disable enqueueing packets to userspace for helper inspection. like, no more sending packets upstairs for a vibe check. π«default-setβ this one is for the timeout subsystem. it lets you set default protocol timeouts. β°default-getβ also for the timeout subsystem. it lets you get the default protocol timeouts. reading the room, timeout-wise. π
π§ SUBSYS π§
as of when this manpage was written, the supported subsystems are timeout and helper. that's the whole roster, no cap.
timeoutβ this subsystem lets you define fine-grain timeout policies. very detail-oriented, very main character. πhelperβ this subsystem lets you configure userspace helpers. π€versionβ displays the version information. βhelpβ displays the help message. when in doubt, ask for help bestie. π
π EXAMPLE π
nfct add timeout test-tcp inet tcp established 100 close 10 close_wait 10
so what's happening here? this creates a timeout policy for tcp using 100 seconds for the ESTABLISHED state, 10 seconds for the CLOSE state, and 10 seconds for the CLOSE_WAIT state. she's precise. she's punctual. she has a schedule. β±οΈ
then, you can attach that timeout policy with the iptables CT target:
iptables -I PREROUTING -t raw -p tcp -j CT --timeout test-tcp
iptables -I OUTPUT -t raw -p tcp -j CT --timeout test-tcp
and you can test that timeout policy with:
conntrack -E -p tcp
it should display:
[UPDATE] tcp 6 100 ESTABLISHED src=192.168.39.100 dst=57.126.1.20
sport=56463 dport=80 src=57.126.1.20 dst=192.168.39.100 sport=80
dport=56463 [ASSURED]
periodt. that's the whole flow and it works. π β¨
π SEE ALSO π
go read those too, they're the friend group. π«Ά
π BUGS π
found something cursed? please, report them to netfilter-devel@vger.kernel.org or file a bug in Netfilter's bugzilla (https://bugzilla.netfilter.org). don't just suffer in silence bestie, tell the devs. π
π AUTHORS π
Pablo Neira Ayuso wrote and maintains the nfct tool. π
Man page written by Pablo Neira Ayuso <pablo@netfilter.org>.
so yeah, that's the whole page. nfct(8), coming at you from Feb 29, 2012, and this is the NFCT(8) manual in the building. stan a conntrack tool. bye bestie, go configure something. πππ¦πΈ
π¦ 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
- debian trixie: nfct 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: conntrack-tools 1.4.8-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: conntrack-tools 1.4.8-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: conntrack-tools 1.4.8-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: conntrack-tools 1.4.8-160000.2.2 Β· GPL-2.0-or-later
- ubuntu noble: nfct 1:1.4.8-1ubuntu1 Β· GPL-2.0-or-later
- ubuntu questing: nfct 1:1.4.8-2
- ubuntu resolute: nfct 1:1.4.9-1 Β· GPL-2.0-or-later
- ubuntu stonking: nfct 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