2021-11-21 04:42:29 +01:00
|
|
|
# Usage
|
|
|
|
|
|
|
|
```
|
2024-03-10 14:07:38 +01:00
|
|
|
nft-edit-ruleset [ --timeout SECONDS | --config [CONFIG_FILE] ] [--fail] [--yes]
|
2021-11-21 04:42:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
# Description
|
|
|
|
|
2021-11-25 15:32:28 +01:00
|
|
|
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.
|
2021-11-21 04:42:29 +01:00
|
|
|
|
|
|
|
# Options
|
|
|
|
|
2021-11-25 15:32:28 +01:00
|
|
|
- `-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.
|
2021-11-21 04:42:29 +01:00
|
|
|
|
|
|
|
# Exit Codes
|
|
|
|
|
2021-11-25 15:32:28 +01:00
|
|
|
- 0: Success: No changes to apply or changes applied successfully.
|
|
|
|
- 1: Error: Usage error or failed or aborted changes.
|
2021-11-21 04:42:29 +01:00
|
|
|
|
|
|
|
# Author and License
|
|
|
|
|
|
|
|
* Author: Tilman Kranz <tilt@linuxfoo.de>
|
|
|
|
* License: MIT License [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT)
|
|
|
|
|