3

About iptables. I saw contradictory explanations.

This site and most article say PREROUTING chain is checked before INPUT chain. But another tutorial(page 4-6) says INPUT is before PREROUTING. Whom to trust?

5

The official netfilter doc states that the PREROUTING is checked before the INPUT chain. The following diagram is taken directly from the doc:

--->PRE------>[ROUTE]--->FWD---------->POST------>
    Conntrack    |       Mangle   ^    Mangle
    Mangle       |       Filter   |    NAT (Src)
    NAT (Dst)    |                |    Conntrack
    (QDisc)      |             [ROUTE]
                 v                |
                 IN Filter       OUT Conntrack
                 |  Conntrack     ^  Mangle
                 |  Mangle        |  NAT (Dst)
                 v                |  Filter

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.