I want to create a custom table using iptables so that I can add my custom chains in it. But I doesn't see any option to do that. I tried to search for it but didnt found anything. Please Help.
I want to create a custom table using iptables so that I can add my custom chains in it. But I doesn't see any option to do that. I tried to search for it but didnt found anything. Please Help.
I think you are looking for creating a chain, not a table.
Example (
-t filter
is implied):Tables can be selected with the
-t
option:And if you are using
iptables-restore
, the above two rules can be combined to:Creating a table is done at the kernel level; normally there is no need to create a new one unless one is adding to the kernel's TCP/IP capabilities.
What you likely want to do is create a new chain in one of the existing tables, which is done with the
-N
flag.