Iptables Command Line Tool: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 14: Line 14:
</pre>
</pre>


The command list all rules in the selected chain.  If no chain is selected, all chains are listed.  
The command list all rules in the selected [[iptables Concepts#Chain|chain]].  If no chain is selected, all chains are listed.  


The command applies to the specified table ("filter" is the default). If you need to list rules from a table other than "filter", use -t (example -t nat).
The command applies to the specified table ("filter" is the default). If you need to list rules from a table other than "filter", use -t (example -t nat).


The command is often used with the -n option, in order to avoid long reverse DNS lookups.
The command is often used with the -n option, in order to avoid long reverse DNS lookups.

Revision as of 20:43, 5 January 2016

Internal

Overview

Commands

List Rules

iptables -L -nv --line-numbers

The command list all rules in the selected chain. If no chain is selected, all chains are listed.

The command applies to the specified table ("filter" is the default). If you need to list rules from a table other than "filter", use -t (example -t nat).

The command is often used with the -n option, in order to avoid long reverse DNS lookups.