Linux & OS Internals
Host firewalls: ufw, iptables and nftables
The app listens on 8080, the security group allows 8080, and curl from another instance still times out. A second firewall inside the host is dropping the packets, and a timeout, not a refusal, is the clue.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Linux & OS Internals
- File systems, fstab, LVM and growing a diskBeginner · 5 min
You enlarged a cloud volume from 100 GB to 200 GB and df still says 100G. The new space has to be passed up through each layer, and the order of the layers is the whole…
- Limits and kernel parameters: ulimit and sysctlBeginner · 5 min
A web server on a 64 GB host logs 'Too many open files' at 1,000 connections. A per-process limit stops it, and the fix lives in the unit file, not in the shell you…
- Shell functions, arguments and getoptsIntermediate · 6 min
Six scripts share one copy-pasted disk check, and a bug fixed in five of them is still live in the sixth. Functions and getopts turn pasted code into one tool with…
- JSON on the command line: curl and jqIntermediate · 5 min
Cloud tools, Kubernetes and web APIs all answer in JSON, and grep cannot read it. One filter language and two curl flags turn a 3,000-line response into the three names…
- PID namespaces: why the PID differs inside a containerBeginner · 5 min
Inside the container nginx is PID 1; on the host the same process is 48213. Both numbers are right, and mixing them up sends kill to the wrong process or leaves docker…
- Signals: SIGTERM, SIGKILL and killBeginner · 5 min
kill -9 works every time, which is exactly the problem. See what a signal is, what a program does with SIGTERM, and why the order matters.