computer_setup:firewall
This is an old revision of the document!
Computer Setup - Firewall
most /proc/net/xt_recent/ATTACK /proc/net/xt_recent/BANNED1 /proc/net/xt_recent/BANNED2 /proc/net/xt_recent/BANNED3 /proc/net/xt_recent/BANNED4 /var/log/iptables.log apt install ipcalc ipcalc 0.0.0.0/7 ipcalc 224.0.0.0/3 ipcalc 96.0.0.0/4
Firewall Reset
#!/bin/bash # # Resets all firewall rules echo "Stopping firewall and allowing everyone..." # # Modify the following settings as required: # IPTABLES=/sbin/iptables # # Reset the default policies in the filter table. # $IPTABLES -P INPUT ACCEPT $IPTABLES -P FORWARD ACCEPT $IPTABLES -P OUTPUT ACCEPT # # Reset the default policies in the nat table. # $IPTABLES -t nat -P PREROUTING ACCEPT $IPTABLES -t nat -P POSTROUTING ACCEPT $IPTABLES -t nat -P OUTPUT ACCEPT # # Reset the default policies in the mangle table. # $IPTABLES -t mangle -P PREROUTING ACCEPT $IPTABLES -t mangle -P POSTROUTING ACCEPT $IPTABLES -t mangle -P INPUT ACCEPT $IPTABLES -t mangle -P OUTPUT ACCEPT $IPTABLES -t mangle -P FORWARD ACCEPT # # Flush all the rules in the filter, nat and mangle tables. # $IPTABLES -F $IPTABLES -t nat -F $IPTABLES -t mangle -F # # Erase all chains that are not default in filter, nat and mangle tables. # $IPTABLES -X $IPTABLES -t nat -X $IPTABLES -t mangle -X
computer_setup/firewall.1625307067.txt.gz · Last modified: 2021/07/03 10:11 by peter