2
0
nft-edit-ruleset/README.md

1.3 KiB

Usage

nft-edit-ruleset [--config [CONFIG_FILE]] [--fail] [--timeout SECONDS] [--yes] 

Description

Interactively edit the current nftables ruleset using the editor specified by environment variable EDITOR (defaulting to vim). Optionally, revert changes after a timeout given in seconds.

Options

  • -c, --config [CONFIG_FILE]:
    If set, on successfully applying changes, save the resulting ruleset to CONFIG_FILE (if CONFIG_FILE is not specified, it defaults to /etc/nftables.conf).
    This option is mutually exclusive with option --timeout.
  • -f, --fail:
    Exit on changes failing to apply instead of prompting the user for re-edit.
  • -h, --help:
    Display this message and exit.
  • -t NUM, --timeout NUM:
    Revert any changes NUM seconds after they have been applied. This is implemented with a systemd timer that remains active after the program has ended.
    This option is mutually exclusive with option --config.
  • -y, --yes:
    Do not prompt for confirmation before applying changes.

Exit Codes

  • 0: Success: No changes to apply or changes applied successfully.
  • 1: Error: Usage error or failed or aborted changes.

Author and License