Linux

iptables

CautionManage iptables firewall

iptables -L -n -v

Direct kernel packet filtering. -L -n shows rules. Rules vanish on reboot unless persisted.

Examples

  • iptables -L -n -v --line-numbersList rules with line numbers

Syntax

iptables [-L] [-A chain rule] [-F]

Before you run it

Bad rules lock you out; -F flushes everything.

Related commands

  • firewall-cmdManage firewalld (RHEL)
  • ufwUncomplicated Firewall
  • ssSockets and listening ports

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store