Skip to content

iptabels

Show rules

iptables -nL
iptables -nL -t nat

Drop IP in inpuet

iptables -A INPUT -s 192.168.1.1 -j DROP

Delete line by number

iptables -L INPUT --line-numbers
iptables -D INPUT [LINE-NUM]

iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X