From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: NAT on the same network
Date: Wed, 28 May 2008 20:04:39 -0500 [thread overview]
Message-ID: <483E0127.4070301@riverviewtech.net> (raw)
In-Reply-To: <1212005433.483dbc39ef035@www.versateladsl.be>
On 05/28/08 15:10, Matton wrote:
> I ave an mail server who can only receive mail from mail-relay for
> adresses rewriting. Then I build rules to forward connection to the
> mail-relay if the source is not the mail-relay.
<snip>
> From proxy2 y ave the connection on the mail-server, fine. for other
> machine I ave a log for the PREROUTING the log for the POSTROUTING
> but the connection c'ant be up to the mail-relay ( proxy2 )
Let me see if I understand what you are wanting to do correctly or not.
It sounds like you are wanting to DNAT any traffic to any SMTP server
to a specific SMTP server with in your network with the exception of the
target SMTP server in your network.
In other words redirect any SMTP traffic over to "Bob" unless the source
is "Bob" and then let "Bob" send to who ever he wants to.
> What can I do ?
You are close with your DNATing rules except for the fact that when
"Bob" replies to "Tom" (who is on your network) "Bob's" reply will not
pass through the system that did the redirecting. This means that "Tom"
will see a packet from "Bob" that he has no idea where it came from and
as such hang up on "Bob".
To make this work, you need to SNAT the traffic that is being redirected
to "Bob" as well as DNATing to "Bob". This will make "Bob" think the
traffic came from the system that did the redirecting and as such reply
to the system that did the redirecting. When the system that did the
redirecting gets "Bob's" reply, it will send it back to "Tom" who sent
the original request that got redirected.
> Thanks for your help
*nod*
Grant. . . .
next prev parent reply other threads:[~2008-05-29 1:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 20:10 NAT on the same network Matton
2008-05-29 1:04 ` Grant Taylor [this message]
2008-05-29 8:24 ` Jan Engelhardt
2008-05-29 16:35 ` 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=483E0127.4070301@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