diff options
author | Marvin Borner | 2020-03-16 23:33:42 +0100 |
---|---|---|
committer | Marvin Borner | 2020-03-16 23:33:42 +0100 |
commit | 0e9ddbb0bf0cd34500155ea4b03de2e2a38d8ab2 (patch) | |
tree | 719da1c7fe5dabb872fe9ff1582c39b55ccd488e /.oh-my-zsh/plugins/firewalld | |
parent | e5d38956336ab1be954bdbd12808c5f98f8bd925 (diff) |
Well I'm using Arch again
Diffstat (limited to '.oh-my-zsh/plugins/firewalld')
-rw-r--r-- | .oh-my-zsh/plugins/firewalld/firewalld.plugin.zsh | 17 | ||||
-rw-r--r-- | .oh-my-zsh/plugins/firewalld/readme.md | 22 |
2 files changed, 0 insertions, 39 deletions
diff --git a/.oh-my-zsh/plugins/firewalld/firewalld.plugin.zsh b/.oh-my-zsh/plugins/firewalld/firewalld.plugin.zsh deleted file mode 100644 index 5b10906..0000000 --- a/.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 -} diff --git a/.oh-my-zsh/plugins/firewalld/readme.md b/.oh-my-zsh/plugins/firewalld/readme.md deleted file mode 100644 index 8b5bc74..0000000 --- a/.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 | |