From: mouss <mouss@netoyen.net>
To: Marty Leisner <leisner@rochester.rr.com>
Cc: netfilter@vger.kernel.org
Subject: Re: simple netfilter machine redirection
Date: Mon, 17 Mar 2008 10:31:58 +0100 [thread overview]
Message-ID: <47DE3A8E.5020307@netoyen.net> (raw)
In-Reply-To: <200803170010.m2H0ABFV016415@dell2.home>
Marty Leisner wrote:
> [snip]
>
> Right, I don't want any NAT -- I just want it to act as a tcp port relayer
> (connection A-B is reflected on connection B-C)
>
> where
>
> A is the source
> B is the relay machine
> C is the destination
>
> and all machines are on the same lan.
>
>
As I said, you need to do both redirection (destination NAT) and source
NAT. In this case, C will only see the IP of B (instead of A), so your
logs (on C) will be somewhat incomplete/inaccurate. This is similar to
running a proxy on B.
but as you see, this is circomvoluted and should be avoided if possible.
if you are trying to do this because the hostname of the C webserver
points to A (happens when C is a webserver reachable from outside), then
consider setting up an internal DNS (or at least an internal DNS view)
so that A goes to C directly.
An alternative is to use routing (on A and C) as Jan said. The problem
is that in this case all flow between A and C will go through B. Also,
consider disabling ICMP redirects (which B would send to both A and C
telling them they can reach each other directly) as appropriate.
next prev parent reply other threads:[~2008-03-17 9:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-16 23:23 simple netfilter machine redirection Marty Leisner
2008-03-16 22:28 ` Justin Piszcz
2008-03-16 22:36 ` mouss
2008-03-17 0:10 ` Marty Leisner
2008-03-16 23:11 ` Jan Engelhardt
2008-03-17 9:31 ` mouss [this message]
2008-03-17 10:29 ` Pascal Hambourg
2008-03-17 14:25 ` Grant Taylor
2008-03-16 22:45 ` bossk
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=47DE3A8E.5020307@netoyen.net \
--to=mouss@netoyen.net \
--cc=leisner@rochester.rr.com \
--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 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.