This is a discussion on iptables: rule with RETURN target after a rule with the ACCEPT target - Networking ; Hi, i've seen in several scripts the following configuration for iptables: iptables criteria -j ACCEPT iptables the_same_criteria_as_above -j RETURN for instance: iptables -A INPUT -p tcp -m tcp --dport 100 -j ACCEPT iptables -A INPUT -p tcp -m tcp --dport ...
Hi, i've seen in several scripts the following configuration for
iptables:
iptables criteria -j ACCEPT
iptables the_same_criteria_as_above -j RETURN
for instance:
iptables -A INPUT -p tcp -m tcp --dport 100 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 100 -j RETURN
The last rule will be never matched, since all tcp incoming
connections with a destination port equal to 100 will be accepted, and
thus this connection will be testing for the next chain. The last line
is useless. So, what's the utility of this configuration?.
TIA