* servers redirection
@ 2012-10-18 12:39 Chiara Simoni
2012-10-18 21:13 ` U.Mutlu
0 siblings, 1 reply; 3+ messages in thread
From: Chiara Simoni @ 2012-10-18 12:39 UTC (permalink / raw)
To: netfilter; +Cc: Chiara simoni
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: servers redirection
2012-10-18 12:39 servers redirection Chiara Simoni
@ 2012-10-18 21:13 ` U.Mutlu
2012-10-19 0:20 ` Jan Engelhardt
0 siblings, 1 reply; 3+ messages in thread
From: U.Mutlu @ 2012-10-18 21:13 UTC (permalink / raw)
To: netfilter
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: servers redirection
2012-10-18 21:13 ` U.Mutlu
@ 2012-10-19 0:20 ` Jan Engelhardt
0 siblings, 0 replies; 3+ messages in thread
From: Jan Engelhardt @ 2012-10-19 0:20 UTC (permalink / raw)
To: U.Mutlu; +Cc: netfilter
On Thursday 2012-10-18 23:13, U.Mutlu wrote:
> 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
Well, masquerade (and other NAT targets) do forward traffic per se -
routing would do that instead -, it merely changes the address.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-19 0:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18 12:39 servers redirection Chiara Simoni
2012-10-18 21:13 ` U.Mutlu
2012-10-19 0:20 ` Jan Engelhardt
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.