From: Martijn Lievaart <m@rtij.nl>
To: cifroes <cifroes@netcabo.pt>
Cc: netfilter@lists.netfilter.org
Subject: Re: target ACCEPT in maccheck chain, forward chain is still used?
Date: Sun, 11 Jun 2006 14:16:01 +0200 [thread overview]
Message-ID: <448C0981.2030807@rtij.nl> (raw)
In-Reply-To: <44898157.8080802@netcabo.pt>
cifroes wrote:
>hi,
>
>I'm configuring a machine with iptables to serve as "router" and I have
>a rather strange question.
>
>I have to do mac check on one of the networks the router is connected so
>I have something like this:
>iptables -t mangle -N maccheck
>iptables -t mangle -I PREROUTING -i eth1 -j maccheck
>iptables -t mangle -A maccheck -m mac -j ACCEPT --mac-source AA:BB:CC...etc
>iptables -t mangle -A maccheck -j DROP
>
>(this is not pasted so ignore the typos)
>
>I also have many rules in FORWARD chain.
>
>
>My question is simple: what happens to the packet when it's marked as
>ACCEPT by the 3rd rule? The rules that apply to that packet in the
>FORWARD chain are still used or the ACCEPT stuff just overrides everything?
>
>
>My tests say the FORWARD RULES are still used, am i correct?
>
>
>
Correct. If a packet is ACCEPTed (which may be implicit by falling of a
chain, in that case the chains policy is applied), processing continues
with the next chain. Otherwise processing stops.
So if your PREROUTING chain has a policy of ACCEPT (which it should,
check with iptables-save command), explicitly ACCEPTing a packet is no
different from falling of the chain. In that last case you already know
the rest of the chains are applied (think of an empty chain), so it is
easy to see that any ACCEPT means to continue with the next chain.
HTH,
M4
prev parent reply other threads:[~2006-06-11 12:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-09 14:10 target ACCEPT in maccheck chain, forward chain is still used? cifroes
2006-06-11 12:16 ` Martijn Lievaart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=448C0981.2030807@rtij.nl \
--to=m@rtij.nl \
--cc=cifroes@netcabo.pt \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.