September 2005
Intermediate to advanced
552 pages
13h 30m
English
It's a good idea to list the rules you've defined, to double-check that they are installed and are in the order you expect. The -L command lists the actual rules for a given chain as they exist in the internal kernel table. Rules are listed in the order in which they are matched against a packet.
The basic format of the iptables list command is as follows:
iptables [-v -n] -L [chain]
or
iptables [-t <table>] [-v -n] -L [chain]
The first format refers to the default filter table. If a specific chain isn't specified, the command lists all rules on the three built-in filter table chains, plus any user-defined chains.
The second format is needed to list the rules on the nat or mangle tables.
Adding the -v option is ...