12

According to https://www.thegeekstuff.com/2011/01/iptables-fundamentals/

IPTables has the following 4 built-in tables.

Filter, NAT, Mangle, and Raw table

What is the iptables command to view all these tables?

Wolf
  • 1,631

3 Answers3

11

iptables-save will show everything.

8

Refer to /proc/net/ip_tables_names file.

$ sudo cat /proc/net/ip_tables_names
mangle
nat
filter
$ 
7

The man page lists a fifth one, security. You can't stack them on one invocation, you'll have to run the command repeatedly for each, e.g.:

for t in filter nat mangle raw security; do
   echo "table $t:"
   iptables -t $t -L
done
ilkkachu
  • 138,973
  • 3
    Also note that the default -L listing can omit important information, like for example if a particular rule will apply to a specific interface only. I would recommend adding -vn to the options to display all the fields and to not attempt to convert IP addresses to names, which could cause delays in output. Note that the resulting output will be rather wider than the standard 80 characters. – telcoM Mar 15 '21 at 15:39