This place needs more of this kind of documentation.
I failed to use IP tables for years. I bought books. I copied recipes from blog posts. Nothing made sense, everything I did was brittle. Until I finally found a schematic showing the flowchart of a packet through the kernel, which gives the exact order that each rule chain is applied, and where some of the sysctl values are enforced. All of a sudden, I could write rules that did exactly what I wanted, or intelligently choose between rules that have equivalent behaviors in isolation but which could have different performance implications.
After studying the schematic, every would just work on the first try. A good schematic makes a world of difference!
Me too, then I discovered FreeBSD and pf tables. I _feel_ like an expert network engineer now. It took time and effort of course, but the learning process "clicked" for me all along the way and I was able to build on my understandings. Give it a try!
Thanks Hrvoje Horvat for such a detailed diagram! It'll help me learn the Network stack much, much easier.
His book "Operativni sustavi i računalne mreže - Linux u primjeni" [0] (Operating systems and computer networks - Linux in use) may well make learning Croatian worth it! Congrats on publishing, and thanks for such an invaluable contribution!
If someone could program a visualization tool that would generate such diagrams automatically, that would be even cooler (but likely a mission impossible).
Automatic generation would be really tough because of all the levels of abstraction traversed in this diagram in particular... But tools like Mermaid / PlantUML can get you in the ballpark, and PGF/TikZ could be a reasonable target if you want to attack that mission by generating text instead of images.
For containers you will also have own TCP/IP stack similarly to what is shown for VM on the diagram, this is done when a container uses slirp4netns to provide networking. An alternative is to use kernel TCP/IP stack, this is done when pasta is used for networking, diagram on this page shows the details:https://passt.top/passt/about/.
Is there some sort of equivalent to this book but in English, which explains and diagrams the Linux network stack? Doesn't need to be all in one, I feel like having a more high level overview and then subsystem diagrams with explanations would work as well.
There’s complication, and there’s complexity. Fools admire complication, engineers design solutions to complex problems. This is a diagram explaining the latter.
elevation|4 months ago
I failed to use IP tables for years. I bought books. I copied recipes from blog posts. Nothing made sense, everything I did was brittle. Until I finally found a schematic showing the flowchart of a packet through the kernel, which gives the exact order that each rule chain is applied, and where some of the sysctl values are enforced. All of a sudden, I could write rules that did exactly what I wanted, or intelligently choose between rules that have equivalent behaviors in isolation but which could have different performance implications.
After studying the schematic, every would just work on the first try. A good schematic makes a world of difference!
HotGarbage|4 months ago
PunchyHamster|4 months ago
waynesonfire|4 months ago
Me too, then I discovered FreeBSD and pf tables. I _feel_ like an expert network engineer now. It took time and effort of course, but the learning process "clicked" for me all along the way and I was able to build on my understandings. Give it a try!
https://docs.freebsd.org/en/books/handbook/firewalls/
There was a recent book published on the tool, The Book of PF, 4th Edition
Koffiepoeder|4 months ago
hhutw|4 months ago
Shout out to the brilliant and generous work of the author!
N-Krause|4 months ago
stuxnet79|4 months ago
rfmoz|4 months ago
colordrops|4 months ago
rolandog|4 months ago
His book "Operativni sustavi i računalne mreže - Linux u primjeni" [0] (Operating systems and computer networks - Linux in use) may well make learning Croatian worth it! Congrats on publishing, and thanks for such an invaluable contribution!
[0]: https://zenodo.org/records/17371946
jruohonen|4 months ago
If someone could program a visualization tool that would generate such diagrams automatically, that would be even cooler (but likely a mission impossible).
alhirzel|4 months ago
mixedbit|4 months ago
billfruit|4 months ago
makkes|4 months ago
elcapitan|4 months ago
roomey|4 months ago
It's been a few years for me tho, so perhaps it's covered with the VM section.
Lovely diagram, thanks for sharing it!
SSLy|4 months ago
PunchyHamster|4 months ago
Doesn't even go into iptables/nftables
ainiriand|4 months ago
zvmaz|4 months ago
dns_snek|4 months ago
[1] https://zenodo.org/records/17371946
RossBencina|4 months ago
phrotoma|4 months ago
jaeyson|4 months ago
alhirzel|4 months ago
nolist_policy|4 months ago
s3092414122|4 months ago
[deleted]
s3092414122|4 months ago
[deleted]
s3092414122|4 months ago
[deleted]
ee99ee|4 months ago
snvzz|4 months ago
9dev|4 months ago
yjftsjthsd-h|4 months ago