Networking - TCP/IP, DNS, Reverse Proxies & Firewalls
Status: Active
Last Updated: 2026-08-26
Category: Networking Fundamentals
Prerequisites: kb/basics/
Tags: networking, tcp-ip, dns, reverse-proxy, traefik, firewall, load-balancing, self-hosted
Summary
Complete networking knowledge from TCP/IP fundamentals through production reverse proxy setups. Learn how data flows, DNS resolution, SSL/TLS, and modern service routing using self-hosted tools like Traefik v3. Updated for Traefik v3, nftables, and current best practices.
๐ฏ Learning Philosophy
Packets Don't Lie:
Physical โ Data Link โ Network โ Transport โ Application
(Wires) (Frames) (IP) (TCP/UDP) (HTTP/DNS)
This directory teaches networking from "what happens when you ping?" through production-ready reverse proxy configurations. Progressive understanding from OSI layers through service mesh concepts.
๐ Learning Path
Prerequisites: Basic Linux, SSH understanding
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHASE 1: Network Fundamentals โ
โ โโ OSI model and TCP/IP โ
โ โโ IP addressing and subnets โ
โ โโ Routing basics โ
โ โโ DNS fundamentals โ
โ โโ Network troubleshooting tools โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHASE 2: Service Networking โ
โ โโ Ports and protocols โ
โ โโ Firewalls (iptables/nftables) โ
โ โโ NAT and port forwarding โ
โ โโ Load balancing concepts โ
โ โโ SSL/TLS fundamentals โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHASE 3: Reverse Proxies โ
โ โโ What is a reverse proxy โ
โ โโ Traefik v3 setup (modern choice) โ
โ โโ Automatic SSL with Let's Encrypt โ
โ โโ Docker labels routing โ
โ โโ Middleware (auth, rate limit) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHASE 4: DNS & Certificates โ
โ โโ Running your own DNS (PiHole) โ
โ โโ Split-horizon DNS โ
โ โโ Let's Encrypt automation โ
โ โโ Wildcard certificates โ
โ โโ Certificate management โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHASE 5: Advanced & Production โ
โ โโ Load balancing algorithms โ
โ โโ Service mesh concepts โ
โ โโ Zero-trust networking โ
โ โโ VPN integration โ
โ โโ Performance optimization โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Articles in This Directory
โ Recently Created (2026-08-26 headless-browser research session)
- traefik-v3-reverse-proxy โ Traefik v3 install, Let's Encrypt automation, Docker label routing, middlewares. โ CREATED 2026-08-26
- firewalls-nftables โ nftables syntax, stateful server ruleset, NAT/port forwarding, persistence. โ CREATED 2026-08-26
- monitoring-networks โ blackbox probes, latency/loss trending, SNMP interface metrics, flow capture, network alert rules. โ CREATED 2026-08-26
๐ข Phase 1: Network Fundamentals (Start Here)
The Basics - How Networks Work:
tcp-ip-fundamentals - How the internet works
- OSI model layers
- TCP vs UDP
- IP addressing (IPv4/IPv6)
- Subnetting basics
- Default gateway, routing
- Prerequisites: None
- Time: 3-4 hours
- Resources:
[โโโโโโโโโโ]30% - Conceptual
ip-addressing-subnets - Understanding IP addresses
- CIDR notation
- Public vs private IPs
- Subnet masks
- Network calculations
- IPv6 addressing
- Prerequisites: TCP/IP basics
- Time: 3-4 hours
- Resources:
[โโโโโโโโโโ]30%
dns-fundamentals - Domain Name System
- What is DNS
- DNS record types (A, AAAA, CNAME, MX, TXT)
- DNS resolution flow
- Authoritative vs recursive
- DNS propagation
- Prerequisites: Networking basics
- Time: 2-3 hours
- Resources:
[โโโโโโโโโโ]30%
network-troubleshooting - Debug connectivity
- ping, traceroute, mtr
- dig, nslookup, host
- netstat, ss, lsof
- tcpdump, wireshark
- Common issues and fixes
- Prerequisites: Linux CLI
- Time: 4-5 hours
- Resources:
[โโโโโโโโโโ]40%
๐ก Phase 2: Service Networking (Security & Routing)
ports-and-protocols - Well-known ports
- Port numbers (22, 80, 443, 3306...)
- TCP vs UDP services
- Service identification
- Port scanning (nmap)
- Prerequisites: TCP/IP understanding
- Time: 2 hours
- Resources:
[โโโโโโโโโโ]20%
firewall-basics - iptables/nftables
- Firewall concepts
- iptables chains (INPUT, OUTPUT, FORWARD)
- Basic rules
- Allow/deny patterns
- Stateful firewalls
- Prerequisites: Linux basics
- Time: 3-4 hours
- Resources:
[โโโโโโโโโโ]50%
firewall-advanced - Production firewall configs
- nftables (modern replacement)
- Rate limiting
- GeoIP blocking
- DDoS protection basics
- Fail2ban integration
- Prerequisites: Firewall basics
- Time: 4-5 hours
- Resources:
[โโโโโโโโโโ]60%
nat-port-forwarding - Routing external traffic
- What is NAT
- Port forwarding setup
- DMZ configuration
- Double NAT issues
- Prerequisites: Routing understanding
- Time: 2-3 hours
- Resources:
[โโโโโโโโโโ]40%
ssl-tls-fundamentals - Encrypted connections
- Public key cryptography
- Certificates and CAs
- TLS handshake
- Certificate chains
- Self-signed vs CA-signed
- Prerequisites: Basic security
- Time: 3-4 hours
- Resources:
[โโโโโโโโโโ]50%
๐ Phase 3: Reverse Proxies (Modern Service Routing)
reverse-proxy-introduction - What is a reverse proxy
- Forward vs reverse proxy
- Use cases
- SSL termination
- Load balancing
- Architecture patterns
- Prerequisites: Web basics
- Time: 2 hours
- Resources:
[โโโโโโโโโโ]30%
traefik-setup - Modern cloud-native proxy (v3)
- Why Traefik v3 vs Nginx
- Docker installation
- Static vs dynamic config
- Provider setup
- Dashboard access
- Prerequisites: Docker basics
- Time: 2-3 hours
- Resources:
[โโโโโโโโโโ]40% - 512MB RAM
traefik-docker-routing - Auto service discovery
- Docker provider
- Labels-based routing
- Dynamic service discovery
- Multiple domains
- Path-based routing
- Prerequisites: Traefik basics
- Time: 3-4 hours
- Resources:
[โโโโโโโโโโ]50%
traefik-ssl-automation - Let's Encrypt integration
- ACME protocol
- HTTP-01 challenge
- DNS-01 challenge (wildcard)
- Certificate storage
- Auto-renewal
- Prerequisites: Traefik routing
- Time: 2-3 hours
- Resources:
[โโโโโโโโโโ]50%
traefik-middleware - Request processing
- Basic auth
- Forward auth (SSO)
- Rate limiting
- IP whitelisting
- Headers manipulation
- Redirect schemes
- Prerequisites: Traefik proficiency
- Time: 3-4 hours
- Resources:
[โโโโโโโโโโ]60%
nginx-alternative - Traditional reverse proxy
- Nginx setup
- Virtual hosts
- SSL configuration
- Load balancing
- Caching
- Prerequisites: Web basics
- Time: 4-5 hours
- Resources:
[โโโโโโโโโโ]50%
๐ด Phase 4: DNS & Certificates (Infrastructure Services)
pihole-setup - Network-wide ad blocking DNS
- Pi-hole installation
- DNS server configuration
- Adblock lists
- Local DNS records
- DHCP integration
- Prerequisites: DNS basics
- Time: 2-3 hours
- Resources:
[โโโโโโโโโโ]30% - 512MB RAM
local-dns-records - Internal DNS management
- Split-horizon DNS
- Local domain setup
- Internal service discovery
- DNS-based service routing
- Prerequisites: DNS understanding
- Time: 2 hours
- Resources:
[โโโโโโโโโโ]30%
letsencrypt-automation - Free SSL certificates
- Certbot setup
- Manual certificate generation
- Automatic renewal
- DNS plugins
- Wildcard certificates
- Prerequisites: SSL understanding
- Time: 3-4 hours
- Resources:
[โโโโโโโโโโ]40%
certificate-management - Production cert handling
- Certificate lifecycle
- Monitoring expiration
- Rotation strategies
- Certificate pinning
- Prerequisites: Cert experience
- Time: 2-3 hours
- Resources:
[โโโโโโโโโโ]50%
โซ Phase 5: Advanced & Production (High Availability)
load-balancing-algorithms - Distribution strategies
- Round-robin
- Least connections
- IP hash
- Weighted algorithms
- Health checks
- Prerequisites: Proxy experience
- Time: 3 hours
- Resources:
[โโโโโโโโโโ]60%
haproxy-setup - Enterprise load balancer
- HAProxy installation
- Frontend/backend config
- ACLs and routing
- SSL termination
- Statistics dashboard
- Prerequisites: Load balancing concepts
- Time: 4-5 hours
- Resources:
[โโโโโโโโโโ]70%
service-mesh-concepts - Modern microservices networking
- What is a service mesh
- Sidecar pattern
- mTLS between services
- Traffic management
- Observability integration
- Prerequisites: k8s basics
- Time: 3-4 hours
- Resources:
[โโโโโโโโโโ]80%
vpn-integration - Private network access
- VPN for homelab access
- WireGuard integration
- Split tunneling
- VPN + reverse proxy
- Prerequisites: VPN basics (security section)
- Time: 3-4 hours
- Resources:
[โโโโโโโโโโ]60%
network-performance - Optimization
- Bandwidth testing
- Latency optimization
- TCP tuning
- Connection pooling
- CDN concepts
- Prerequisites: Production experience
- Time: 4-5 hours
- Resources:
[โโโโโโโโโโ]70%
๐ What Comes Next?
After mastering networking:
For Containers:
- kb/containers/docker-networking - Container networks
For Security:
- kb/security/wireguard-vpn - VPN setup
- kb/security/firewall-hardening - Security
For Observability:
- kb/observability/network-monitoring - Monitor traffic
For Cloud:
- kb/cloud/object-storage-networking - Storage networking
๐ Resource Requirements
Traefik (v3+):
- Minimal: 256MB RAM, 1 CPU
[โโโโโโโโโโ]20% - Production: 512MB RAM, 1 CPU
[โโโโโโโโโโ]30%
Pi-hole:
- Single Network: 512MB RAM, 1 CPU
[โโโโโโโโโโ]30% - Large Network: 1GB RAM, 1 CPU
[โโโโโโโโโโ]40%
HAProxy:
- Small: 512MB RAM, 2 CPU
[โโโโโโโโโโ]40% - Enterprise: 2-4GB RAM, 4 CPU
[โโโโโโโโโโ]70%
Complete Networking Stack (Traefik + Pi-hole + Monitoring):
- Homelab: 1-2GB RAM
[โโโโโโโโโโ]40% - Small Production: 4-6GB RAM
[โโโโโโโโโโ]60%
Learning Time Investment:
- Network Fundamentals: 2-3 weeks
[โโโโโโโโโโ]40% - Reverse Proxies: 2 weeks
[โโโโโโโโโโ]50% - Advanced: 1-2 months
[โโโโโโโโโโ]70% - Production Mastery: 6-12 months
[โโโโโโโโโโ]100%
๐ ๏ธ Recommended Tool Stack
Reverse Proxy (Pick ONE):
- Traefik
[โโโโโโโโโโ]Required - Modern, auto-config (v3+) - Nginx
[โโโโโโโโโโ]80% - Traditional, powerful - Caddy
[โโโโโโโโโโ]70% - Simplest, auto-SSL - HAProxy
[โโโโโโโโโโ]60% - Enterprise, performance
DNS:
- Pi-hole
[โโโโโโโโโโ]90% - Adblocking + DNS - Unbound
[โโโโโโโโโโ]70% - Recursive DNS - CoreDNS
[โโโโโโโโโโ]60% - k8s-native - AdGuard Home
[โโโโโโโโโโ]70% - Pi-hole alternative
Firewall:
- nftables
[โโโโโโโโโโ]90% - Modern replacement (default on Ubuntu 20.04+) - iptables
[โโโโโโโโโโ]80% - Traditional, stable (now a nftables frontend on Ubuntu) - UFW
[โโโโโโโโโโ]70% - User-friendly wrapper
SSL Certificates:
- Let's Encrypt
[โโโโโโโโโโ]Required - Free CA - Certbot
[โโโโโโโโโโ]90% - ACME client - Traefik ACME
[โโโโโโโโโโ]80% - Built-in - nginx ACME module
[โโโโโโโโโโ]70% - Native Rust module (nginx 1.25+)
Monitoring:
- Grafana + Prometheus
[โโโโโโโโโโ]90% - Network metrics - Netdata
[โโโโโโโโโโ]80% - Real-time
๐ก Pro Tips for Networking
- Document Your Network: IP ranges, VLANs, firewall rules
- DNS is Critical: Local DNS makes everything easier
- Let's Encrypt is Free: No excuse for self-signed certs
- Reverse Proxy Everything: Single entry point, easier management
- Monitor Network: Know your baseline, detect anomalies
- Test Firewall Rules: Block everything, open incrementally
- Use VLANs: Segment IoT, servers, management
- Plan IP Addressing: Leave room for growth
- Automate Certificate Renewal: Never let certs expire
- Keep It Simple: Complexity is the enemy of security
๐ Common Networking Pitfalls
Pitfall 1: No Firewall
- Everything exposed to internet
- Fix: Default deny, whitelist only needed ports
Pitfall 2: Expired Certificates
- Manual renewal forgotten, services down
- Fix: Automate with Traefik or Certbot
Pitfall 3: DNS Misconfiguration
- Services unreachable, hard to debug
- Fix: Test DNS with dig, use local DNS server
Pitfall 4: Port Confusion
- Services on wrong ports, conflicts
- Fix: Document port assignments, use standard ports when possible
Pitfall 5: Single Point of Failure
- One proxy/DNS server down = everything down
- Fix: HA setup for critical services
Pitfall 6: No Network Segmentation
- IoT devices on same network as servers
- Fix: VLANs, separate networks
Pitfall 7: Overcomplicating
- Too many layers, hard to troubleshoot
- Fix: Start simple, add complexity only when needed
Pitfall 8: Ignoring IPv6
- Future-proofing neglected
- Fix: Learn IPv6 basics, dual-stack where possible
Pitfall 9: Using iptables directly on modern Ubuntu
- iptables is now a nftables frontend; rules may behave unexpectedly
- Fix: Use nftables directly or UFW for simpler management
Pitfall 10: Manual cert renewal with Let's Encrypt
- Rate limits hit, certs expire
- Fix: Use ACME client with auto-renewal (Traefik, Certbot, nginx ACME module)
๐ Related KB Sections
- kb/basics/ - Linux fundamentals, SSH
- kb/containers/ - Docker networking
- kb/security/ - VPN, firewalls, Zero Trust
- kb/observability/ - Network monitoring
- kb/cloud/ - Cloud networking patterns
๐ Change Log
2026-01-30
- Created networking directory structure
- Defined complete learning path from TCP/IP to service mesh
- Established Traefik as modern reverse proxy choice
- Listed all planned articles with time estimates
- Added resource requirements for networking tools
- Emphasized self-hosted DNS and certificate automation
- Organized by learning phases (1-5)
- Added tool recommendations with popularity ratings
- Cross-referenced related KB sections
- Included production networking patterns
2026-08-15
- Updated for Traefik v3 as default recommendation
- Added nftables as primary firewall (default on Ubuntu 20.04+)
- Added WireGuard integration notes
- Added nginx native ACME module
- Added AdGuard Home as Pi-hole alternative
- Added pitfalls for iptables on modern Ubuntu and manual cert renewal
- Updated resource requirements
Change Log
- 2026-08-26: Added 2 new articles created via headless-browser web research session; marked planned items as created.
- 2026-08-26: Added monitoring-networks โ completes all planned Phase articles for this section.