mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 23:30:08 +00:00
sudo firewall-cmd calls
This commit is contained in:
parent
e726af8f83
commit
e12f8e64ea
2 changed files with 7 additions and 7 deletions
|
@ -1,17 +1,17 @@
|
||||||
alias fw="firewall-cmd"
|
alias fw="sudo firewall-cmd"
|
||||||
alias fwp="firewall-cmd --permanent"
|
alias fwp="sudo firewall-cmd --permanent"
|
||||||
alias fwr="firewall-cmd --reload"
|
alias fwr="sudo firewall-cmd --reload"
|
||||||
alias fwrp="firewall-cmd --runtime-to-permanent"
|
alias fwrp="sudo firewall-cmd --runtime-to-permanent"
|
||||||
|
|
||||||
function fwl () {
|
function fwl () {
|
||||||
# converts output to zsh array ()
|
# converts output to zsh array ()
|
||||||
# @f flag split on new line
|
# @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
|
for i in $zones; do
|
||||||
firewall-cmd --zone $i --list-all
|
sudo firewall-cmd --zone $i --list-all
|
||||||
done
|
done
|
||||||
|
|
||||||
echo 'Direct Rules:'
|
echo 'Direct Rules:'
|
||||||
firewall-cmd --direct --get-all-rules
|
sudo firewall-cmd --direct --get-all-rules
|
||||||
}
|
}
|
||||||
|
|
0
plugins/firewalld/readme.md
Normal file
0
plugins/firewalld/readme.md
Normal file
Loading…
Reference in a new issue