Interactively edit the current nftables ruleset.
Go to file
tilman fa7f799f44 clarify mutually exclusive options in synopsis syntax 2024-03-10 14:07:38 +01:00
LICENSE Add LICENSE 2021-11-29 08:40:23 +00:00
Makefile add installation procedure 2021-11-21 04:42:15 +01:00
README.md clarify mutually exclusive options in synopsis syntax 2024-03-10 14:07:38 +01:00
nft-edit-ruleset more consistent behavior of --config and --timeout 2021-11-25 15:32:28 +01:00

README.md

Usage

nft-edit-ruleset [ --timeout SECONDS | --config [CONFIG_FILE] ] [--fail] [--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