From 1b8493f0abadeb9a5615b275a2875b4f8067622a Mon Sep 17 00:00:00 2001 From: Samson-W Date: Mon, 9 Sep 2019 18:05:13 +0800 Subject: [PATCH] Update etc.iptables.rules.v4.sh --- docs/configurations/etc.iptables.rules.v4.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/configurations/etc.iptables.rules.v4.sh b/docs/configurations/etc.iptables.rules.v4.sh index 98827f8..2d7e2b2 100644 --- a/docs/configurations/etc.iptables.rules.v4.sh +++ b/docs/configurations/etc.iptables.rules.v4.sh @@ -1,6 +1,15 @@ #!/bin/bash IPT="/sbin/iptables" - +PUB_IFS="ens33" + +if [ $# -lt 1 ]; then + echo "Must be set to greater than or equal to a public network interface. usage: $0 eth0, or $0 eth0 eth1" + exit 1 +else + PUB_IFS="$@" + echo "Public interface is $PUB_IFS" +fi + echo "Starting IPv4 Wall..." $IPT -F $IPT -X @@ -11,7 +20,6 @@ IPT="/sbin/iptables" $IPT -N LOGDROP modprobe ip_conntrack -PUB_IFS="ens33" #unlimited $IPT -A INPUT -i lo -j ACCEPT