Duration: 2 days (7 hours per day)
Course Outline / Agenda
Day 1 – Introduction & iptables Fundamentals
- Chapter 1: Firewall Concepts
- What is a firewall and why it’s needed
- Stateful vs stateless filtering
- Packet flow: INPUT, OUTPUT, FORWARD chains
- Chapter 2: iptables Basics
- Installing and checking iptables
- Understanding tables: filter, nat, mangle, raw
- Managing chains: INPUT, OUTPUT, FORWARD
- Chapter 3: Basic Rules
- Allowing or blocking traffic by IP, port, or protocol
- Default policies and order of rules
- Saving and restoring iptables rules
- Chapter 4: Logging and Monitoring
- Using
LOGtarget for packet logging - Monitoring firewall activity
- Using
Day 2 – nftables Basics & Simple Use Cases
- Chapter 5: Introduction to nftables
- Difference between iptables and nftables
- Tables, chains, and sets in nftables
- Installing and enabling nftables
- Chapter 6: Writing Basic nftables Rules
- Filtering traffic by IP, port, and protocol
- NAT and port forwarding
- Using sets for multiple IPs or ports
- Chapter 7: Basic Management
- Viewing, flushing, and saving rules
- Using
nft list rulesetandnft delete - Integrating nftables with system startup
- Chapter 8: Simple Firewall Scenarios
- Block all incoming traffic except SSH
- Allow web traffic (HTTP/HTTPS) to a web server
- Drop traffic from a blacklist of IPs