Iptables

A mini wiki to refer to adding, delete or amending Iptables rules

List Specific Chain:

sudo iptables -S TCP

List Rules as Tables

sudo iptables -L
sudo iptables -L INPUT

Show Packet Counts and Aggregate Size

sudo iptables -L INPUT -v

Delete Rule by Specification

sudo iptables -D INPUT -m conntrack --ctstate INVALID -j DROP
sudo iptables -L --line-numbers

Flush Chains

sudo iptables -F INPUT
sudo iptables -F

References:

Last updated