Skip to contentSkip to conversation

states and UDP

DISCUSSION T. Horsnell 3 participants 3 messages Mar 3, 2006 – Mar 6, 2006

lore
Share & tools
lore
#0 lore raw

Am I right in thinking that the stateful capabilities of iptables (NEW/ESTABLISHED/RELATED etc) only apply to tcp connections? If not, how are these states defined for udp?

iptables doesnt complain if I add a rule containing '-p udp -m state --state NEW'

Thanks,
Terry.

#1 lore raw
Quoted 5 lines · T. Horsnell

Am I right in thinking that the stateful capabilities of iptables (NEW/ESTABLISHED/RELATED etc) only apply to tcp connections? If not, how are these states defined for udp?

Quoted 7 lines

iptables doesnt complain if I add a rule containing '-p udp -m state --state NEW'

Thanks,
Terry.

any tracked connection can have state. For instance, one could write a conneciton tracker for NFS over UDP mounts and use the state flag in firewall rules. That's not a real example (to my knowledge), I'm just showing that the capability is there.

#2 lore raw
In reply to T. Horsnell
Quoted 7 lines · T. Horsnell

Am I right in thinking that the stateful capabilities of iptables (NEW/ESTABLISHED/RELATED etc) only apply to tcp connections? If not, how are these states defined for udp?

iptables doesnt complain if I add a rule containing '-p udp -m state --state NEW'

Conntrack states are valid for all protocols. They are different from TCP states.
The man page and tutorial describe what they mean:
http://iptables-tutorial.frozentux.net/iptables-tutorial.html#USERLANDSTATES