From: "John A. Sullivan III" <John.Sullivan@nexusmgmt.com>
To: "Erik Wikström" <eriwik@itstud.chalmers.se>
Cc: netfilter@lists.netfilter.org
Subject: Re: Routing and PREROUTING
Date: Mon, 12 Jul 2004 11:18:15 -0400 [thread overview]
Message-ID: <40F2ABB7.2080801@nexusmgmt.com> (raw)
In-Reply-To: <20040712145806.GA30044@itstud.chalmers.se>
Erik Wikström wrote:
> Hi again
>
> I'm probably thinking to much here but I've got a bit of a problem with
> allowing traffic from my local network out to the Internet. Currently
> I've got the following rules which should do that:
>
> # Allow traffic from LAN to WAN
> $IPT -t nat -A PREROUTING -i $LAN -s $LOCAL_NET -j ACCEPT
> $IPT -t filter -A FORWARD -i $LAN -o $WAN -s $LOCAL_NET -j ACCEPT
> $IPT -t nat -A POSTROUTING -o $WAN -s $LOCAL_NET -j MASQUERADE
>
> My problem is with the first rule, where I'm uding the "nat" table but
> I'm not doing any NATing, more like filtering since I only pass some
> packets. And filtering is not supposed to be done in the "nat" table but
> on the other hand there is no filter table in PREROUTING.
>
> But the alternative would be to have a ACCEPT policy in the
> PREROUTING-chain and do all the filtering in the FORWARD-chain, which is
> kind of unnecessary since a number of packets would then have to travel
> through a number of rules (larger than the number of rules in the
> PREROUTING-chain) just to be droped in the end. So is my rule OK to use
> or would you do in any other way?
>
> --
> Erik Wikström
Hmmm . . . someone correct me if I'm wrong but I think your first rule
will end processing in the nat table but the packet will still pass to
the FORWARD table where, if it does not match a rule, it will be handled
by your FORWARD chain policy - John
--
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net
next prev parent reply other threads:[~2004-07-12 15:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-12 14:58 Routing and PREROUTING Erik Wikström
2004-07-12 15:15 ` Antony Stone
2004-07-12 15:18 ` John A. Sullivan III [this message]
2004-07-12 16:02 ` Antony Stone
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=40F2ABB7.2080801@nexusmgmt.com \
--to=john.sullivan@nexusmgmt.com \
--cc=eriwik@itstud.chalmers.se \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox