←back to thread

602 points hhutw | 1 comments | | HN request time: 0.368s | source
Show context
elevation ◴[] No.45640290[source]
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!

replies(4): >>45640322 #>>45640323 #>>45643938 #>>45648472 #
Koffiepoeder ◴[] No.45640323[source]
Can you share the diagram? Would love to become iptables-enlightened.
replies(3): >>45640358 #>>45640550 #>>45640583 #
eptcyka ◴[] No.45640550[source]
It is time to be nftables enlightened instead.
replies(3): >>45640582 #>>45641007 #>>45648050 #
1. VTimofeenko ◴[] No.45640582[source]
Similar diagram, right in nftables wiki:

https://wiki.nftables.org/wiki-nftables/index.php/Netfilter_...