Skip to content

Commit

Permalink
Fix #118
Browse files Browse the repository at this point in the history
  • Loading branch information
loyess committed Feb 26, 2023
1 parent 6ad2f66 commit e1f7dac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/firewalls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ ip6tables_start(){
}

iptables_persistent(){
if [ "${PKGMER}" = 'dnf' ] || [ "${PKGMER}" = 'yum' ]; then
if check_sys packageManager yum; then
if [ ! -e "/etc/systemd/system/multi-user.target.wants/iptables.service" ]; then
package_install "iptables-services"
fi
iptables_start
iptables-save > /etc/sysconfig/iptables
ip6tables_start
ip6tables-save > /etc/sysconfig/ip6tables
else
elif check_sys packageManager apt; then
if [ ! -e "/etc/systemd/system/multi-user.target.wants/netfilter-persistent.service" ]; then
# ref: https://gist.github.com/alonisser/a2c19f5362c2091ac1e7
echo 'iptables-persistent iptables-persistent/autosave_v4 boolean true' | debconf-set-selections
Expand Down

0 comments on commit e1f7dac

Please sign in to comment.