61
General Discussion / Re: ESTABLISHED,RELATED - How to block NEW ?
« Last post by meyergru on Today at 03:57:44 pm »However, my issue is the following when one does step by step :
1. first, A pings B : there is no answer - correct
2. second, B pings A : it works - correct
3. but now, if A pings B, A gets replies - NOT CORRECT
You seem not to understand that - unlike with real stateful traffic like TCP - with ICMP traffic, there is no "state" other than a time period where traffic in the reverse direction was seen.
A established TCP connection is characterized by a quadruple of (src_ip, src_port, dst_ip, dst_port). Thus, you can actually determine which response packets are to be allowed. If a packet was observed with a different dst_port as sender, it would not be allowed, since it cannot be attributed to the existing connection.
With ICMP, this is different. There is no port, only an ICMP subtype. Other than that, there are only (src_ip, dst_ip). Thus, you can only decide based on "soft" factors ("related"), like if within the last few seconds, you saw ICMP traffic between both parties that might explain why another ICMP packet is seen (and being passed).
Try the same test on an iptables-based firewall and you will probably see the same result.
Or, retry step 3 of your test after some time has passed.