Avi .L.
07-24-2004, 06:04 PM
Netfilter supports connection tracking and stateful inspection giving
us the ability to match a packet with a session.
I have questions regarding to iptables rules matching and connection
tracking mechanism.
Assuming I configured an iptable rule which MARK packets going to port
80 with a certain value:
1. Is it true that the rule matching is done per packet and not per
session ?
(If we know for a certain packet in a session its port then we know it
for the rest of the session packets, so it is enough to do it on the
first session's packet).
2. Is it true that iptables rules which specifies port numbers don't
use the stateful support ? (for example, if I configured a MARK rule
on a packet going to/ from port 20 (ftp-data) why shouldn't it apply
also on RELATED sessions which were opened using the passive mode).
Assuming I configured a NAT rule :
1. Is it true that for NAT rule matching is done on a per session base
?
(I think I read that there is a cache for NAT decisions on a per
session base)
us the ability to match a packet with a session.
I have questions regarding to iptables rules matching and connection
tracking mechanism.
Assuming I configured an iptable rule which MARK packets going to port
80 with a certain value:
1. Is it true that the rule matching is done per packet and not per
session ?
(If we know for a certain packet in a session its port then we know it
for the rest of the session packets, so it is enough to do it on the
first session's packet).
2. Is it true that iptables rules which specifies port numbers don't
use the stateful support ? (for example, if I configured a MARK rule
on a packet going to/ from port 20 (ftp-data) why shouldn't it apply
also on RELATED sessions which were opened using the passive mode).
Assuming I configured a NAT rule :
1. Is it true that for NAT rule matching is done on a per session base
?
(I think I read that there is a cache for NAT decisions on a per
session base)