28 lines
705 B
Bash
28 lines
705 B
Bash
#!/bin/sh
|
|
|
|
##### CLEAN ALL RULES & DROP IPV4 AND IPV6 PACKETS #####
|
|
|
|
## Delete all existing rules.
|
|
/usr/sbin/iptables -F
|
|
/usr/sbin/iptables -X
|
|
/usr/sbin/iptables -t nat -F
|
|
/usr/sbin/iptables -t nat -X
|
|
/usr/sbin/iptables -t mangle -F
|
|
/usr/sbin/iptables -t mangle -X
|
|
|
|
/usr/sbin/ip6tables -F
|
|
/usr/sbin/ip6tables -X
|
|
/usr/sbin/ip6tables -t nat -F
|
|
/usr/sbin/ip6tables -t nat -X
|
|
/usr/sbin/ip6tables -t mangle -F
|
|
/usr/sbin/ip6tables -t mangle -X
|
|
|
|
## Accept ALL IPV4 and IPV6 INPUT and OUTPUT
|
|
/usr/sbin/iptables -P INPUT ACCEPT
|
|
/usr/sbin/iptables -P OUTPUT ACCEPT
|
|
/usr/sbin/iptables -P FORWARD ACCEPT
|
|
|
|
/usr/sbin/ip6tables -P INPUT ACCEPT
|
|
/usr/sbin/ip6tables -P OUTPUT ACCEPT
|
|
/usr/sbin/ip6tables -P FORWARD ACCEPT
|