mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
docs(firewalld): add documentation about backup function
This commit is contained in:
parent
c9d265986a
commit
37b7ef9f89
2 changed files with 11 additions and 9 deletions
|
|
@ -9,14 +9,15 @@ plugins=(... firewalld)
|
|||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
| :---- | :----------------------------------------- | :--------------------------- |
|
||||
| fw | `sudo firewall-cmd` | Shorthand |
|
||||
| fwr | `sudo firewall-cmd --reload` | Reload current configuration |
|
||||
| fwp | `sudo firewall-cmd --permanent` | Create permanent rule |
|
||||
| fwrp | `sudo firewall-cmd --runtime-to-permanent` | Save current configuration |
|
||||
| :------ | :----------------------------------------- | :--------------------------- |
|
||||
| `fw` | `sudo firewall-cmd` | Shorthand |
|
||||
| `fwr` | `sudo firewall-cmd --reload` | Reload current configuration |
|
||||
| `fwp` | `sudo firewall-cmd --permanent` | Create permanent rule |
|
||||
| `fwrp` | `sudo firewall-cmd --runtime-to-permanent` | Save current configuration |
|
||||
|
||||
## Functions
|
||||
|
||||
| Function | Description |
|
||||
| :------- | :--------------------------------------------------------- |
|
||||
| fwl | Lists configuration from all active zones and direct rules |
|
||||
| :--------- | :---------------------------------------------------------------------------------------- |
|
||||
| `fwl` | Lists configuration from all active zones and direct rules |
|
||||
| `fwbackup` | Saves the current firewall configuration by copying all zone files to `~/firewall-backup` |
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ function fwl () {
|
|||
sudo firewall-cmd --direct --get-all-rules
|
||||
}
|
||||
|
||||
# backup
|
||||
function fwbackup() {
|
||||
sudo firewall-cmd --runtime-to-permanent
|
||||
mkdir -p ~/firewall-backup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue