Redirecting IP address to somewhere else.

~J~

~J~

Soldato
Joined
20 Oct 2003
Posts
7,558
Location
London
Anyone know if it's possible to redirect a call to an IP address to a totally different IP address?

We've a program on our server which is about 6 years old, was wrote in VB6 and has the database IP address hard-coded in to it. (obvious answer is to change the code and recompile, but the code is lost!)

We're re-writing the programs anyway, but was wondering if there's a way to do something on the client where the program is installed to say if a call is made to go to 111.222.333.444 then go to 555.666.777.888 instead.

Is this possible at all?
 
In theory you could run a box with your software on behind a nat gateway which then port forwards onto the real IP of the db server.

eg:

Yoursoftware > nat box (which has the IP of the old db server) > db server

If your db server is on the same subnet i'm not sure if it will work, worth giving a go though.
 
It's over the internet.

We're basically moving dedicated servers from one host to another so the IP addresses are totally different.
 
As said, you could do it if you tried hard enough with a NAT box of some kind.

After you've done that though, you should find the person who wrote that code and make sure they can never write any more for being so dumb...
 
you should find the person who wrote that code and make sure they can never write any more for being so dumb...

As well as setup a source code versioning system (eg svn), i find it extremely useful even just for my own projects (we use it at work - we're a software company).
 
you could nat it at your gateway firewall - would to add source ip address and ports so it doesnt nat all traffic to said ip address.

iptables will do this, what is your gateway firewall running?
 
So you have the DB server and the Web Server on the same subnet.
You've got to re address because your moving to a different provider.

Simplest thing here is to put another nic in the web and DB servers and use the old address's.
Just run a crossover cable between the servers.
No need for a gateway as there on the same subnet.

The address's won't be routable anymore as they belong to your old provider but that doesn't matter you just need a private point to point between the 2 servers.

Having your DB server on an internet routable address is not good BTW.
 
Back
Top Bottom