From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Redirecting ports in a bridge
Date: Fri, 18 Apr 2008 09:44:52 -0500 [thread overview]
Message-ID: <4808B3E4.6090009@riverviewtech.net> (raw)
In-Reply-To: <48086990.5060000@juntadeandalucia.es>
On 04/18/08 04:27, Javier Prieto Martínez wrote:
> 1) I have to SNAT the response. I've tried that rule: iptables -t
> nat -A POSTROUTING -p tcp --sport 80 -s 192.168.2.2 -d 192.168.1.0/24
> -j SNAT --to-source 192.168.2.1
As Jan Engelhardt has pointed out so well, you are very likely dealing
with (what I call) a "TCP Triangle". If there is not something else in
the mix doing source NATing, you will need to do something else to avoid
the "TCP Triangle". There are many different options available, one of
which is the SNATing like you are referring to (though I would be
careful on selecting the packets to SNAT). Another would be to have
your clients connect to IPs on LAN 1 that are bound to the router that
is DNATing traffic to LAN 2 and then unDNATing the replies. You could
also have duplicate IPs bound on server 1 and server 2 and use some
clustering techniques to alter which MAC address / server the packet(s)
go to, thus allowing both servers to answer with the proper IP.
> 2) I have to use ebtables, as I'm using a bridge.
I would suggest that you use EBTables seeing as how you are bridging. I
think things will be easier to maintain and you will be using a simpler
operation.
Grant. . . .
prev parent reply other threads:[~2008-04-18 14:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-18 9:27 Redirecting ports in a bridge Javier Prieto Martínez
2008-04-18 10:35 ` Jan Engelhardt
2008-04-18 10:55 ` Javier Prieto Martínez
2008-04-18 11:29 ` Jan Engelhardt
2008-04-18 11:41 ` Javier Prieto Martínez
2008-04-18 12:26 ` Marc Cozzi
2008-04-18 12:34 ` Javier Prieto Martínez
2008-04-23 15:25 ` Jan Engelhardt
2008-04-18 14:38 ` Grant Taylor
2008-04-21 6:55 ` Javier Prieto Martínez
2008-04-22 1:30 ` Grant Taylor
2008-04-22 6:15 ` Javier Prieto Martínez
2008-04-22 14:29 ` Grant Taylor
2008-04-22 15:10 ` Javier Prieto Martínez
2008-04-22 19:24 ` Grant Taylor
2008-04-23 15:24 ` Jan Engelhardt
2008-04-23 17:16 ` Grant Taylor
2008-04-23 18:48 ` Jan Engelhardt
2008-04-23 18:57 ` Grant Taylor
2008-04-24 6:15 ` Javier Prieto Martínez
2008-04-18 14:34 ` Grant Taylor
2008-04-18 14:44 ` Grant Taylor [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=4808B3E4.6090009@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox