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.
i finally got it to work by adding the following line at the top of shorewall masq file on old server:
+eth1 0.0.0.0/0 192.168.1.1 tcp 43597