Content #
{add | create} table [family] table [ {comment comment ;} { flags 'flags ; }]
{delete | list | flush} table [family] table
list tables [family]
delete table [family] handle handle
There are four commands available when working with a table:
- add - Add a table.
- delete - Delete a table.
- list - Display all of the chains and rules for a table.
- flush - Clear all chains and rules in a table.
list which tables are available:
nft list tables
define a table that will hold normal firewall chains and rules:
nft add table filter
Further information about the table
nft list table filter
When listing rules, adding the -a option to show handle numbers is quite helpful. The handle can be used to modify or delete a rule rather easily.
-
Prevent both address and port resolution
nft list table filter -nn