All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Hickey <bugfood-ml@fatooh.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] IP Tables on a bridge
Date: Wed, 21 Sep 2005 17:27:21 +0000	[thread overview]
Message-ID: <433197F9.1010300@fatooh.org> (raw)
In-Reply-To: <20050921154617.356DC18134@www.idealconditions.com>

ICI Support wrote:
> Now, the problem I have is that my LAN is mixed NAT'd addresses and routable
> IPs.  I have a host of FORWARD rules to determine which packets get sent
> onto which servers (routable IPs).  My worry is that if I put in the
> "iptables -A FORWARD -j ACCEPT" it'll defeat the whole purpose of those
> entries.
> 
> My question is:  How do I set up a FORWARD for JUST the NATed packets
> without touching the non-NATed packets?   Would a -d to my internal network
> ($INTERNAL_NET is set to 192.168.10.0/24) do it?
> 
> IE would this work:
> 
> iptables -A POSTROUTING -t nat -s $INTERNAL_NET -j MASQUERADE
> 
> iptables -A FORWARD -d $INTERNAL_NET -j ACCEPT

If I tested this properly, it does seem to work. You could follow the
command above with whatever rules jumping to ACCEPT you want, ending
with a REJECT for whatever you don't want (or set the policy for FORWARD
to REJECT).

There are some other ways to do it. May I ask why this machine is a
bridge? My guess is that you have something like this:

[Internet] ----> T1 router ----> Linux bridge ----> LAN

...wherein the T1 router handles the routing to/from your public IPs and
your bridge handles the routing (with NAT) from your private IPs.

> Also, if I post up my iptables entries/script, can someone help me proof
> them for problems?

Sure; it couldn't hurt, unless someone nasty sees a flaw and tries to
attack one of your systems through it. :)

I'm going to be gone for several days, but I'll look at it when I get
back. Somebody else might look, too.

-Corey
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

  reply	other threads:[~2005-09-21 17:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-21 16:12 [LARTC] IP Tables on a bridge ICI Support
2005-09-21 17:27 ` Corey Hickey [this message]
2005-09-21 18:23 ` ICI Support
2005-09-21 19:34 ` Corey Hickey
2005-09-21 19:54 ` ICI Support
2005-09-22  4:10 ` Grant Taylor

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=433197F9.1010300@fatooh.org \
    --to=bugfood-ml@fatooh.org \
    --cc=lartc@vger.kernel.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.