Hi, we're about to move some services from an old host to a newer one, however, we want to keep up the old host for a week after the migration, so, that everyone may choose their own good time to switch their IP's in their local configs.
that is, I want to all IP packets incoming at $old_ip to be redirected to
$new_ip via iptables.
unfortunately, in my little test, that didn't work '(
Executing the following on the $old_ip's host.
$ old_ip=public.ip.1
$ new_ip=public.ip.2
$ iptables -t nat -A PREROUTING -p tcp --dport 81 \
-d $old_ip -i eth0 -j DNAT --to-destination $new_ip:80
$ iptables -t nat -A POSTROUTING -p tcp --sport 80 -\
s $new_ip -o eth0 -j SNAT --to-source $old_ip:81
now, a $(telnet $old_ip:81) shall be equivalent to $(telnet $new_ip:80).
but it seems that no packet is reaching the $new_ip's host.
So has anybody a nice hint for me where I ran into what pitfall?
Thanks in advance,
Christian Parpart.
pgpc5YFqin3Aw.pgp
Description: PGP signature
