From: Brian Austin - Standard Universal <brian@standarduniversal.com.au>
To: Grant Taylor <gtaylor@riverviewtech.net>
Cc: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: forward/proxy/something one external IP to an other
Date: Sat, 27 Sep 2008 09:25:56 +1000 [thread overview]
Message-ID: <48DD6F84.9070002@standarduniversal.com.au> (raw)
In-Reply-To: <48DD2D2C.8030202@riverviewtech.net>
Grant Taylor wrote:
> On 09/26/08 11:50, Jan Agermose wrote:
>> we are going to move some servers from one datacenter to an other and
>> not all DNS are under our direct control so Im want to place a linux
>> box in the old center to forward trafic for the old IPs to the new
>> IPs - or Im hoping this is possible :) So that traffic going to the
>> old IPs will still work until all DNS is updated.
>
> Ok...
>
>> The servers are on a NAT 1-1 network and are moved to a new 1-1 NAT
>> network - if this matters?
>
> Should not matter.
>
>> Can someone explain if its possible and how to do it?
>
> Yes it is possible. You will need to DNAT the traffic as it comes in
> to the nat:PREROUTING chain to redirect it over to the real server as
> well as SNAT the traffic as it leaves the nat:POSTROUTING chain so
> that the traffic appears to the real server as if it is coming from
> the NATing server. By making the traffic appear as being from the
> NATing server the real server will reply back to the NATing server
> which can then unNAT the traffic and reply directly back to the real
> client.
>
> Or, you could run something like rinetd which will accept the
> connections and then proxy them to the real server. This is extremely
> easy to set up too.
>
>
>
> Grant. . . .
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
I think like this...
iptables -t nat -A PREROUTING -d 192.168.19.253 -i eth19 -p
tcp --dport 993 -j DNAT --to-destination 192.168.41.5:993
iptables -t nat -A POSTROUTING -d 192.168.41.5 -j MASQUERADE
next prev parent reply other threads:[~2008-09-26 23:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 16:50 forward/proxy/something one external IP to an other Jan Agermose
2008-09-26 18:42 ` Grant Taylor
2008-09-26 23:25 ` Brian Austin - Standard Universal [this message]
2008-09-28 18:09 ` 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=48DD6F84.9070002@standarduniversal.com.au \
--to=brian@standarduniversal.com.au \
--cc=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