add policy alias and function

master
David Kebler 2024-04-28 16:53:25 -07:00
parent f42ff4420d
commit 99abc67abf
1 changed files with 25 additions and 5 deletions

View File

@ -2,21 +2,41 @@
export FIREWALLD=/etc/firewalld
alias fw="firewall-cmd"
alias fwz="firewall-cmd --zone"
alias fwzi="firewall-cmd --info-zone"
alias fwpr="firewall-cmd --permanent"
alias fwzp="firewall-cmd --permanent --zone"
alias fwper="firewall-cmd --permanent"
alias fwr="firewall-cmd --reload"
alias fwh="firewall-cmd --help | more"
alias fwhg="firewall-cmd --help | grep -A3"
alias fwr2p="firewall-cmd --runtime-to-permanent"
alias fwz="firewall-cmd --zone"
alias fwzi="firewall-cmd --info-zone"
alias fwzp="firewall-cmd --permanent --zone"
alias fwaz="firewall-cmd --get-active-zones"
alias fwpi="firewall-cmd --info-policy"
alias fwp="firewall-cmd --policy"
alias fwpp="firewall-cmd --permanent --policy"
alias fwap="firewall-cmd --get-active-policies"
alias fwaz="firewall-cmd --get-active-zones"
alias fwiwan="firewall-cmd --info-zone wan"
alias fwilan="firewall-cmd --info-zone lan"
alias fwivpn="firewall-cmd --info-zone vpn"
fwrr () {
cmd="firewall-cmd --zone $1 --add-rich-rule='rule family="ipv4" ${@:2:$#}'"
echo $cmd
$cmd
}
fwrrp () {
cmd="firewall-cmd --policy $1 --add-rich-rule='rule family="ipv4" ${@:2:$#}'"
echo $cmd
$cmd
}
alias inti="ip addr show | grep -A3"
fwiz () {