← 返回命令列表

Linux command

conntrack 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

conntrack -L

Example

conntrack -E

Example

conntrack -E -o timestamp

Example

conntrack -E -s ip_address

Delete

conntrack -D -s ip_address

说明

conntrack interacts with the Linux kernel's connection tracking system (conntrack). It allows viewing, searching, and modifying tracked network connections used by stateful firewalling.

参数

-L, --dump
List all currently tracked connections
-E, --event
Display real-time connection events
-D, --delete
Delete connections matching criteria
-U, --update
Update connections matching criteria
-s, --orig-src _address_
Filter by original source address
-d, --orig-dst _address_
Filter by original destination address
-p, --proto _protocol_
Filter by protocol (tcp, udp, icmp)
-o, --output _type_
Output format (extended, timestamp, xml)
--src-nat
Filter for SNAT connections
--dst-nat
Filter for DNAT connections

FAQ

What is the conntrack command used for?

conntrack interacts with the Linux kernel's connection tracking system (conntrack). It allows viewing, searching, and modifying tracked network connections used by stateful firewalling.

How do I run a basic conntrack example?

Run `conntrack -L` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -L, --dump do in conntrack?

List all currently tracked connections