Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

iptables: rule with RETURN target after a rule with the ACCEPT target

Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2007, 09:43 PM
Default iptables: rule with RETURN target after a rule with the ACCEPT target



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



Neroku
Reply With Quote
Reply

Tags
accept, iptables, return, rule, target

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:05 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.