iptables simple ban ip rules
Ban an IP address (IP address cannot be entered on the server)
# iptables -A INPUT -s 1.2.3.4 -j DROP
Ban an IP address (cannot be accessed from the server on the IP)
# iptables -A OUTPUT -s 1.2.3.4 -j DROP
Delete Rule by Chain and Number
# iptables -L --line-numbers
# iptables -D INPUT 3
Flush a Single Chain
Delete all of the rules in the INPUT chain, run this command
# iptables -F INPUT
Flush All Rules, Delete All Chains, and Accept All
# iptables -P INPUT ACCEPT
# iptables -P FORWARD ACCEPT
# iptables -P OUTPUT ACCEPT
# iptables -t nat -F
# iptables -t mangle -F
# iptables -F
# iptables -X