From 7dc9ab9e5140ae9f4b2017f23d8eedae5fc3c515 Mon Sep 17 00:00:00 2001 From: bedefaced Date: Sat, 26 Aug 2017 16:43:57 +0300 Subject: [PATCH] iptables fix --- pptp/iptables-setup.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pptp/iptables-setup.sh b/pptp/iptables-setup.sh index 137f4a3..cbe6c8d 100755 --- a/pptp/iptables-setup.sh +++ b/pptp/iptables-setup.sh @@ -3,6 +3,13 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) source $DIR/env.sh +if [ "$PLATFORM" == "$CENTOSPLATFORM" ]; then + systemctl enable iptables + systemctl stop firewalld + systemctl disable firewalld + systemctl start iptables +fi + COMMENT=" -m comment --comment \"PPTP\"" if [[ ! -e $IPTABLES ]]; then @@ -28,7 +35,7 @@ done # detect default gateway interface echo "Found next network interfaces:" -ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d' +ifconfig -a | sed 's/[: \t].*//;/^\(lo\|\)$/d' echo GATE=$(route | grep '^default' | grep -o '[^ ]*$') read -p "Enter your external network interface: " -i $GATE -e GATE