I am a beginner in firewall and trying my hands on stateful firewall rules. I do understand that with stateful rules, the first packet is inspected as per the rules but subsequent packets that belong to the same connection are passed without any checks.
But I didnt really understand the states NEW ESTABLISHED RELATED. For instance if i want a stateful firewall which of these states I should include in the rule?
-A INPUT -m conntract --ctstate ESTABLISHED,NEW -j ACCEPT
What will the above rule do in context of these states?