conntrack — connection tracking
cheat sheet · Linux · conntrack-tools https://lab.dimsanych.ru/en/wiki/conntrack/Cheat sheet
-
sudo conntrack -Lconnections -
sudo conntrack -Eevents in real time -
sudo conntrack -Sdrops / insert_failed -
sudo conntrack -D -s 10.0.0.5reset a source's connections -
cat /proc/sys/net/netfilter/nf_conntrack_{count,max}table load -
sudo sysctl -w net.netfilter.nf_conntrack_max=262144raise the limit
Options
| Flag | Meaning |
|---|---|
-L |
list connections (the tracking table) |
-E |
real-time event stream |
-S |
per-CPU statistics (drops, insert_failed) |
-D |
delete entries (matching a filter) |
-p / --dport / -s / -d |
filter: protocol / port / source / destination |
--state |
filter by state (ESTABLISHED, TIME_WAIT…) |