2
0
Interactively edit the current nftables ruleset.
Go to file
2021-11-25 15:32:28 +01:00
Makefile add installation procedure 2021-11-21 04:42:15 +01:00
nft-edit-ruleset more consistent behavior of --config and --timeout 2021-11-25 15:32:28 +01:00
README.md more consistent behavior of --config and --timeout 2021-11-25 15:32:28 +01:00

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