From 9c17b94ad34d32191d89452bbe8ec948f7742775 Mon Sep 17 00:00:00 2001 From: fossilfranv Date: Tue, 28 Mar 2023 00:34:55 +0200 Subject: [PATCH] Add 'flush_ip_tables.sh' --- flush_ip_tables.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 flush_ip_tables.sh diff --git a/flush_ip_tables.sh b/flush_ip_tables.sh new file mode 100644 index 0000000..91449d7 --- /dev/null +++ b/flush_ip_tables.sh @@ -0,0 +1,16 @@ +#!/bin/sh +echo "Stopping IPv4 firewall and allowing everyone..." +ipt="/sbin/iptables" +## Failsafe - die if /sbin/iptables not found +[ ! -x "$ipt" ] && { echo "$0: \"${ipt}\" command not found."; exit 1; } +$ipt -P INPUT ACCEPT +$ipt -P FORWARD ACCEPT +$ipt -P OUTPUT ACCEPT +$ipt -F +$ipt -X +$ipt -t nat -F +$ipt -t nat -X +$ipt -t mangle -F +$ipt -t mangle -X +$ipt -t raw -F +$ipt -t raw -X