From e24482eb6677009f130d1124b29a5beaf4b2c9be Mon Sep 17 00:00:00 2001 From: George Liu Date: Thu, 10 Jul 2014 15:39:56 +1000 Subject: [PATCH] update inc/csfinstall.inc for firewalld --- centmin.sh | 4 ++++ inc/csfinstall.inc | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/centmin.sh b/centmin.sh index c077fe901..44e8a8a2f 100644 --- a/centmin.sh +++ b/centmin.sh @@ -204,6 +204,10 @@ fi ENABLE_MENU='y' +##################################################### +# CentOS 7 specific +FIREWALLD_DISABLE='n' + ##################################################### # CCACHE Configuration CCACHEINSTALL='y' diff --git a/inc/csfinstall.inc b/inc/csfinstall.inc index d9f770e05..1227781e4 100644 --- a/inc/csfinstall.inc +++ b/inc/csfinstall.inc @@ -4,6 +4,25 @@ csfinstalls() { if [[ "$CSFINSTALLOK" = [yY] ]]; then +# if CentOS 7 is detected disable firewalld in favour +# of iptables ip6tables for now +if [[ "$CENTOS_SEVEN" = '7' ]]; then + if [[ "$FIREWALLD_DISABLE" = [yY] ]]; then + # disable firewalld + systemctl disable firewalld + systemctl stop firewalld + + # install iptables-services package + yum -y install iptables-services + + # start iptables and ip6tables services + systemctl start iptables + systemctl start ip6tables + systemctl enable iptables + systemctl enable ip6tables + fi +fi + echo "*************************************************" cecho "* Installing CSF firewall... " $boldgreen echo "*************************************************"