Skip to content

Commit

Permalink
ufw to firewalld
Browse files Browse the repository at this point in the history
  • Loading branch information
Shardbyte committed Jul 19, 2024
1 parent 668bcfa commit 992bb50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ ask_firewall() {

install_firewall() {
case "$OS" in
ubuntu | debian | fedora)
ubuntu | debian)
output ""
output "Installing Uncomplicated Firewall (UFW)"

Expand All @@ -371,7 +371,7 @@ install_firewall() {
success "Enabled Uncomplicated Firewall (UFW)"

;;
rocky | almalinux)
rocky | almalinux | fedora)

output ""
output "Installing FirewallD"+
Expand All @@ -390,13 +390,13 @@ install_firewall() {

firewall_allow_ports() {
case "$OS" in
ubuntu | debian | fedora)
ubuntu | debian)
for port in $1; do
ufw allow "$port"
done
ufw --force reload
;;
rocky | almalinux)
rocky | almalinux | fedora)
for port in $1; do
firewall-cmd --zone=public --add-port="$port"/tcp --permanent
done
Expand Down

0 comments on commit 992bb50

Please sign in to comment.