diff --git a/plugins/firewalld/firewalld.plugin.zsh b/plugins/firewalld/firewalld.plugin.zsh index 52c5229a5..bfbf6f48f 100644 --- a/plugins/firewalld/firewalld.plugin.zsh +++ b/plugins/firewalld/firewalld.plugin.zsh @@ -1,17 +1,17 @@ -alias fw="firewall-cmd" -alias fwp="firewall-cmd --permanent" -alias fwr="firewall-cmd --reload" -alias fwrp="firewall-cmd --runtime-to-permanent" +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)$(firewall-cmd --get-active-zones | grep -v interfaces)}") + zones=("${(@f)$(sudo firewall-cmd --get-active-zones | grep -v interfaces)}") for i in $zones; do - firewall-cmd --zone $i --list-all + sudo firewall-cmd --zone $i --list-all done echo 'Direct Rules:' - firewall-cmd --direct --get-all-rules + sudo firewall-cmd --direct --get-all-rules } diff --git a/plugins/firewalld/readme.md b/plugins/firewalld/readme.md new file mode 100644 index 000000000..e69de29bb