iptables fix
This commit is contained in:
parent
f53fb1ed6e
commit
7dc9ab9e51
@ -3,6 +3,13 @@
|
|||||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
source $DIR/env.sh
|
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\""
|
COMMENT=" -m comment --comment \"PPTP\""
|
||||||
|
|
||||||
if [[ ! -e $IPTABLES ]]; then
|
if [[ ! -e $IPTABLES ]]; then
|
||||||
@ -28,7 +35,7 @@ done
|
|||||||
|
|
||||||
# detect default gateway interface
|
# detect default gateway interface
|
||||||
echo "Found next network interfaces:"
|
echo "Found next network interfaces:"
|
||||||
ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d'
|
ifconfig -a | sed 's/[: \t].*//;/^\(lo\|\)$/d'
|
||||||
echo
|
echo
|
||||||
GATE=$(route | grep '^default' | grep -o '[^ ]*$')
|
GATE=$(route | grep '^default' | grep -o '[^ ]*$')
|
||||||
read -p "Enter your external network interface: " -i $GATE -e GATE
|
read -p "Enter your external network interface: " -i $GATE -e GATE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user