CentOS 5.x
I'm trying to confirm which specific rule in my iptables config is allowing return UDP traffic from my DNS server. I THINK, it's this one:
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
If I take off RELATED
and bounce iptables, DNS queries on the server still work.
If I comment out the line entirely, and bounce iptables, DNS queries start failing.
So by that logic, it seems reasonable to me that iptables is considering the return UDP packet to be part of an ESTABLISHED
connection state. Why does it think that though?
I get that it sees the response coming back to a port pertaining to an open query but the man page for iptables defines ESTABLISHED
state as "the packet is associated with a connection which has seen packets in both directions". In this case, only one UDP packet would have been sent out and presumably only one would be coming back. Where did the connection previously seen "packets in both directions"?
Apologies in advance if I'm over-thinking this.