diff options
author | 2024-03-25 16:43:09 +0530 | |
---|---|---|
committer | 2024-03-25 16:43:09 +0530 | |
commit | a62114c91f2070c8c8453d117f3d81dc113e41ff (patch) | |
tree | f266e87af29a08c01f82bc32dd7d463d8ec4441a /zsh/oh-my-zsh/plugins/firewalld | |
parent | af120ab348f2e1a5a39dec035ed9dcf84189a64e (diff) | |
download | dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.gz dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.bz2 dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.zip |
dotfile update
Diffstat (limited to 'zsh/oh-my-zsh/plugins/firewalld')
-rw-r--r-- | zsh/oh-my-zsh/plugins/firewalld/README.md | 22 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/firewalld/firewalld.plugin.zsh | 17 |
2 files changed, 0 insertions, 39 deletions
diff --git a/zsh/oh-my-zsh/plugins/firewalld/README.md b/zsh/oh-my-zsh/plugins/firewalld/README.md deleted file mode 100644 index 8b5bc74..0000000 --- a/zsh/oh-my-zsh/plugins/firewalld/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# FirewallD Plugin - -This plugin adds some aliases and functions for FirewallD using the `firewalld-cmd` command. To use it, add firewalld to your plugins array. - -```zsh -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 | - -## Functions - -| Function | Description | -| :------- | :--------------------------------------------------------- | -| fwl | Lists configuration from all active zones and direct rules | diff --git a/zsh/oh-my-zsh/plugins/firewalld/firewalld.plugin.zsh b/zsh/oh-my-zsh/plugins/firewalld/firewalld.plugin.zsh deleted file mode 100644 index 5b10906..0000000 --- a/zsh/oh-my-zsh/plugins/firewalld/firewalld.plugin.zsh +++ /dev/null @@ -1,17 +0,0 @@ -alias fw="sudo firewall-cmd" -alias fwp="sudo firewall-cmd --permanent" -alias fwr="sudo firewall-cmd --reload" -alias fwrp="sudo firewall-cmd --runtime-to-permanent" - -function fwl () { - # converts output to zsh array () - # @f flag split on new line - zones=("${(@f)$(sudo firewall-cmd --get-active-zones | grep -v 'interfaces\|sources')}") - - for i in $zones; do - sudo firewall-cmd --zone $i --list-all - done - - echo 'Direct Rules:' - sudo firewall-cmd --direct --get-all-rules -} |