root@firewall:~# iptables -L -n -v

The iptables reference you'll actually bookmark

Clear, practical guides to Linux firewalling. From your first DROP rule to advanced nftables sets. No theory dumps — just working examples.

# Allow established connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow SSH from trusted network
iptables -A INPUT -p tcp --dport 22 -s 10.0.0.0/8 -j ACCEPT
# Drop everything else
iptables -P INPUT DROP
Start Learning →

Guides & Deep Dives

From zero to zero-trust, one rule at a time.

Beginner

Your First iptables Rules

Understand chains, tables, targets, and policies. Build a basic server firewall from scratch in 15 minutes.

Beginner

iptables vs nftables

nftables is the successor. When to migrate, what's different, and how to translate your existing rules.

Advanced

NAT & Port Forwarding

SNAT, DNAT, MASQUERADE — when to use each and how to set up a Linux router with proper NAT rules.

Advanced

Rate Limiting & Connection Tracking

Prevent brute-force attacks with hashlimit, conntrack, and recent modules. Real-world rules for SSH and HTTP.

Reference

Complete iptables Cheat Sheet

Every flag, every target, every match module. Printable, searchable, always up to date.

Reference

Docker & Kubernetes Networking

How Docker and kube-proxy manipulate iptables behind the scenes. Debug CNI issues like a pro.

// Quick Reference

iptables -L -n -v --line-numbers
List all rules with line numbers and packet counts
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
Allow HTTPS inbound
iptables -D INPUT 3
Delete rule #3 from INPUT chain
iptables-save > /etc/iptables/rules.v4
Persist rules across reboots (Debian/Ubuntu)