Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
e726af8f
Commit
e726af8f
authored
Sep 07, 2016
by
Rob Ede
Browse files
add firewalld aliases
parent
71201ffd
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/firewalld/firewalld.plugin.zsh
0 → 100644
View file @
e726af8f
alias
fw
=
"firewall-cmd"
alias
fwp
=
"firewall-cmd --permanent"
alias
fwr
=
"firewall-cmd --reload"
alias
fwrp
=
"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
)
}
"
)
for
i
in
$zones
;
do
firewall-cmd
--zone
$i
--list-all
done
echo
'Direct Rules:'
firewall-cmd
--direct
--get-all-rules
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment