-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstop6.fw
27 lines (24 loc) · 863 Bytes
/
stop6.fw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Linux Firewall: Simple Shell Script To Stop and Flush All Iptables Rules
# Some Linux distros like Debian do not have /etc/init.d/iptables stop script
# This can be also called from cron job if you are testing new firewall on
# remote box to avoid lock out
# -------------------------------------------------------------------------
# Copyright (c) 2012 Naqsh Jahan Toos Inc. <http://jnaqsh.com/>
# This script is licensed under GNU GPL version 3.0 or above
# -------------------------------------------------------------------------
IPT6="/sbin/ip6tables"
echo "Stopping IPv6 Wall..."
$IPT6 -F
$IPT6 -X
$IPT6 -Z
for table in $(</proc/net/ip6_tables_names)
do
$IPT6 -t $table -F
$IPT6 -t $table -X
$IPT6 -t $table -Z
done
# ACCEPT all incomming traffic
$IPT6 -P INPUT ACCEPT
$IPT6 -P OUTPUT ACCEPT
$IPT6 -P FORWARD ACCEPT