* Forward udp and tcp to another external IP address.
@ 2005-08-22 16:09 John Kielkopf
2005-08-23 11:53 ` Gavin Hamill
0 siblings, 1 reply; 2+ messages in thread
From: John Kielkopf @ 2005-08-22 16:09 UTC (permalink / raw)
To: netfilter
We're planning on moving a server to another location and to ease to
move we'd like to for forward all TCP and UDP traffic coming in on a
particular IP address at location A to a different address at location
B. Note that these addresses are from two different hosts.
Using rinetd I can do this for TCP, but I haven't figured out how to get
iptables to do this for TCP or UDP.
Anyone?
Thanks,
-John
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Forward udp and tcp to another external IP address.
2005-08-22 16:09 Forward udp and tcp to another external IP address John Kielkopf
@ 2005-08-23 11:53 ` Gavin Hamill
0 siblings, 0 replies; 2+ messages in thread
From: Gavin Hamill @ 2005-08-23 11:53 UTC (permalink / raw)
To: netfilter
On Monday 22 August 2005 17:09, John Kielkopf wrote:
> We're planning on moving a server to another location and to ease to
> move we'd like to for forward all TCP and UDP traffic coming in on a
> particular IP address at location A to a different address at location
> B. Note that these addresses are from two different hosts.
Here's a standard recipe I've used for doing this..
# Make the firewall act as a non-caching TCP proxy. Useful for machine moves
whilst DNS propogates.
$IPTABLES -t nat -A PREROUTING -p tcp --dport 80 -d 194.200.209.137 -j DNAT
--to 213.2.4.33
$IPTABLES -A FORWARD -p tcp --dport 80 -d 194.200.209.137 -j ACCEPT
$IPTABLES -t nat -A POSTROUTING -p tcp --dport 80 -d 213.2.4.33 -j SNAT --to
194.200.209.137
In this case, a web server was runnning on 194.200.209.137 that we were
physically moving to a new location at 213.2.4.33...
These rules were loaded onto the firewall at 194.200.209.254...
Cheers,
Gavin.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-23 11:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-22 16:09 Forward udp and tcp to another external IP address John Kielkopf
2005-08-23 11:53 ` Gavin Hamill
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.