linux networking: how to redirect incoming connections from old server to new server?

Posted by aliz on Server Fault See other posts from Server Fault or by aliz
Published on 2011-03-09T14:54:22Z Indexed on 2011/03/10 16:12 UTC
Read the original article Hit count: 191

Filed under:
|
|
|
|

hi

I'm in the process of moving my old server to a new server, but i will keep the old server running for database replication and load balancing, etc. each server has a separate internet connection with a static ip, and they are connected through a local Ethernet connection. I've got Ubuntu 8.04 32-bit running on old server and Debian 6.0 64-bit on new one. shorewall firewall is installed on both servers. there are some outdoor devices which are periodically sending data to port 43597 for old server IP address. I can run multiple instances of the network service which is responsible for receiving data from devices on a server but on different ports.

here's the question:

how can I run the service on new server and have connections coming to old server redirected to it, and new devices can still connect to new server's IP address preferably on the same port and same service? until all devices get updated to send to new server.

I've tried a shorewall DNAT rule, but seems like new server's default route should be changed to ethernet connection, which breaks other things.

I also found about redir utility, but still haven't tried it.

is there any best practice or simple solution for such a scenario, i'm not aware of?

thanks in advance.

© Server Fault or respective owner

Related posts about linux

Related posts about networking