From 31dfd20b1268353e9042dbe1c829f6ed1ca2ae86 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Wed, 18 Aug 2021 10:43:30 -0400 Subject: [PATCH] iptables current rules reset --- scripts/install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index 4c86999..0afb353 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -113,8 +113,17 @@ if [ -f "/etc/iptables/rules.v4" ]; then if [[ "${MISTBORN_IPTABLES_ACTION}" =~ ^([cC])$ ]]; then # clear + echo "Clearing existing iptables rules..." sudo rm -rf /etc/iptables/rules.v4 + sudo iptables -F + sudo iptables -t nat -F + sudo iptables -P INPUT ACCEPT + sudo iptables -P FORWARD ACCEPT sudo rm -rf /etc/iptables/rules.v6 || true + sudo ip6tables -F || true + sudo ip6tables -t nat -F || true + sudo ip6tables -P INPUT ACCEPT || true + sudo ip6tables -P FORWARD ACCEPT || true elif [[ "${MISTBORN_IPTABLES_ACTION}" =~ ^([aA])$ ]]; then # do nothing