Blogs » Jeff Brown's blog

Flush iptables, remove fail2ban ban

remove/flush all rules & delete chains
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

-F : Deleting (flushing) all the rules.
-X : Delete chain.
-t table_name : Select table (called nat or mangle) and delete/flush rules.
-P : Set the default policy (such as DROP, REJECT, or ACCEPT).

Release from fail2ban jail:
iptables -I INPUT -s 41.162.30.254 -i eth0 -j ACCEPT ## -I(nsert), NOT -A(ppend)
or
iptables -L -n --line-numbers
iptables -D INPUT (line number)

Comments

Add new comment

Total views: 1,326