Add 'flush_ip_tables.sh'

This commit is contained in:
fossilfranv 2023-03-28 00:34:55 +02:00
parent 2ddddf6e4f
commit 9c17b94ad3

16
flush_ip_tables.sh Normal file
View File

@ -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