Browse Source

iptables current rules reset

merge-requests/95/head
Steven Foerster 4 years ago
parent
commit
31dfd20b12
  1. 9
      scripts/install.sh

9
scripts/install.sh

@ -113,8 +113,17 @@ if [ -f "/etc/iptables/rules.v4" ]; then
if [[ "${MISTBORN_IPTABLES_ACTION}" =~ ^([cC])$ ]]; then if [[ "${MISTBORN_IPTABLES_ACTION}" =~ ^([cC])$ ]]; then
# clear # clear
echo "Clearing existing iptables rules..."
sudo rm -rf /etc/iptables/rules.v4 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 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 elif [[ "${MISTBORN_IPTABLES_ACTION}" =~ ^([aA])$ ]]; then
# do nothing # do nothing

Loading…
Cancel
Save