iptables
Installation
SKILL.md
iptables / nftables
Overview
iptables is the traditional Linux firewall. nftables is its modern replacement (default on newer distros). Both filter network packets using rules organized in chains and tables. Essential for server hardening.
Instructions
Step 1: Basic iptables Rules
# View current rules
sudo iptables -L -n -v
# Allow established connections
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
# Allow SSH (port 22)
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
Related skills