diff --git a/firewall/firewall b/firewall/firewall index 5c11aba..ec51d55 100644 --- a/firewall/firewall +++ b/firewall/firewall @@ -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 () {