Skip to content

knft ¤

Functions:

Attributes:

parser module-attribute ¤

parser = ArgumentParser(
    description="Utility for inspecting the kernel netfilter subsystem."
)

subparsers module-attribute ¤

subparsers = add_subparsers(dest='command')

list_flowtables_parser module-attribute ¤

list_flowtables_parser = add_parser(
    "list-flowtables",
    description="Dump netfilter flowtables from a specific table",
    help="Dump netfilter flowtables from a specific table",
)

list_objects_parser module-attribute ¤

list_objects_parser = add_parser(
    "list-objects",
    description="Dump netfilter objects from a specific table",
    help="Dump netfilter objects from a specific table",
)

list_sets_parser module-attribute ¤

list_sets_parser = add_parser(
    "list-sets",
    description="Dump netfilter sets from a specific table",
    help="Dump netfilter sets from a specific table",
)

list_exprs_parser module-attribute ¤

list_exprs_parser = add_parser(
    "list-exprs",
    description="Dump only expressions from specific rule",
    help="Dump only expressions from specific rule",
)

list_rules_parser module-attribute ¤

list_rules_parser = add_parser(
    "list-rules",
    description="Dump netfilter rules from a specific chain",
    help="Dump netfilter rules from a specific chain",
)

list_chains_parser module-attribute ¤

list_chains_parser = add_parser(
    "list-chains",
    description="Dump netfilter chains from a specific table",
    help="Dump netfilter chains from a specific table",
)

list_tables_parser module-attribute ¤

list_tables_parser = add_parser(
    "list-tables",
    description="Dump netfilter tables from a specific network namespace",
    help="Dump netfilter tables from a specific network namespace",
)

dump_parser module-attribute ¤

dump_parser = add_parser(
    "dump",
    description="Dump all nftables: tables, chains, rules, expressions",
    help="Dump all nftables: tables, chains, rules, expressions",
)

parse_nft_family ¤

parse_nft_family(s: str) -> int

knft_dump ¤

knft_dump(nsid: int | None = None) -> None

knft_list_tables ¤

knft_list_tables(nsid: int | None = None) -> None

knft_list_chains ¤

knft_list_chains(
    table_family: int | None = None,
    table_name: str | None = None,
    nsid: int | None = None,
) -> None

knft_list_rules ¤

knft_list_rules(
    table_family: int | None = None,
    table_name: str | None = None,
    chain_name: str | None = None,
    nsid: int | None = None,
) -> None

knft_list_exprs ¤

knft_list_exprs(
    table_family: int | None = None,
    table_name: str | None = None,
    chain_name: str | None = None,
    rule_id: int | None = None,
    nsid: int | None = None,
) -> None

knft_list_sets ¤

knft_list_sets(
    table_family: int | None = None,
    table_name: str | None = None,
    nsid: int | None = None,
) -> None

knft_list_objects ¤

knft_list_objects(
    table_family: int | None = None,
    table_name: str | None = None,
    nsid: int | None = None,
) -> None

knft_list_flowtables ¤

knft_list_flowtables(
    table_family: int | None = None,
    table_name: str | None = None,
    nsid: int | None = None,
) -> None

knft ¤

knft(
    command: str,
    table_family: int | None = None,
    table_name: str | None = None,
    nsid: int | None = None,
    chain_name: str | None = None,
    rule_id: int | None = None,
) -> None