Basic usage
- List rules (with rule number)
iptables -L --line-number
- Append a output log rule for only 1 minute
iptables -A OUTPUT -m limit --limit 1/minute -j LOG --log-level 4 --log-prefix 'OutAllow1/m'
- Delete a rule by number
iptables -D INPUT 4
- Remove all iptables rules
-
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 FORWARD ACCEPT iptables -P OUTPUT ACCEPT