2
0
nft-edit-ruleset/README.md

42 lines
1.3 KiB
Markdown
Raw Normal View History

2021-11-21 04:42:29 +01:00
# Usage
```
nft-edit-ruleset [--config [CONFIG_FILE]] [--fail] [--timeout SECONDS] [--yes]
2021-11-21 04:42:29 +01:00
```
# 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.
2021-11-21 04:42:29 +01:00
# 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.
2021-11-21 04:42:29 +01:00
# Exit Codes
- 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)