All of lore.kernel.org
 help / color / mirror / Atom feed
From: "U.Mutlu" <for-gmane@mutluit.com>
To: netfilter@vger.kernel.org
Subject: Re: servers redirection
Date: Thu, 18 Oct 2012 23:13:24 +0200	[thread overview]
Message-ID: <508070F4.300@mutluit.com> (raw)
In-Reply-To: <032613bb98974765717d7ae8ebe48e3c@imap.cnaf.infn.it>

The following link has a solution for a similar scenario
"By using iptables and its masquerade feature, it is possible
to forward all traffic to the old server to the new IP":
   http://www.debuntu.org/how-to-redirecting-network-traffic-a-new-ip-using-iptables


Chiara Simoni wrote, On 10/18/2012 02:39 PM:
> Hi,
> I need to redirect all requests to my server "Xserver:Xport", to server "Yserver:Yport".
>
> For some months I've been using these iptables commands,
> with Destination NAT and Source NAT on server "Xserver":
>
> /sbin/iptables -t nat -A PREROUTING  -p tcp -d "$Xserver" --dport "$Xport"  -j DNAT --to-destination
> "$Yserver:$Yport"
> /sbin/iptables -t nat -A POSTROUTING -p tcp -d "$Yserver" --dport "$Yport" -j SNAT --to-source "$Xserver"
>
> Now, these same commands don't work any more,
> and I don't now why.
> Recently the only changes I made on my servers
> is a reboot.
>
> Can you help me?
> Have I made some mistakes on these commands?
>
> Thanks
>
> Ch.



  reply	other threads:[~2012-10-18 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18 12:39 servers redirection Chiara Simoni
2012-10-18 21:13 ` U.Mutlu [this message]
2012-10-19  0:20   ` Jan Engelhardt

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=508070F4.300@mutluit.com \
    --to=for-gmane@mutluit.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.