|
iptables - Is it necessary to use the NEW state match?
I am looking to learn more about netfilter/iptables. I have been reading a lot of different documents online and I notice that some people open a port like this:
(using http as an example)
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
While other use the state match like so:
iptables -I INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT
My question is, why do I need to use the state new here? I understand that the NEW mean a new connection, and I understand the use of ESTABLISHED, RELATED. But is the NEW needed here? What is the working difference between the two statements above?
|