Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've just migrated to a new server but some of the legacy code has some IPs hardcoded. Can someone tell me how to redirect requests for one IP and make them go to another?

EG. I ping 83.83.83.83 and it gets redirected to 66.221.24.31.

I'm using Windows Server 2008

share|improve this question

4 Answers 4

up vote 1 down vote accepted

You can do that only on a router, and you'd need quite a powerful one, too.

You just can't tell to a server "treat this IP address as if it was another one".

If your application was looking for a certain hostname, you could map that to a given IP using the HOSTS file; but redirecting one IP to another is... well... a lot more tricky.

share|improve this answer

You can add a secondary IP address to the new server. Go to control panel, network connections. Right click on the network interface and select properties. Select Internet protocol and click on properties. Click on the advanced button. Under the IP address box click add and enter the ip address for the old server.

Another option if you are using seperate networks (looks like might be based on the difference if ip address ranges) you can use a NAT router and put the old address on the WAN port and redirect the traffic to the new IP address on the LAN port.

share|improve this answer

You don't give a lot of detail but I'm assuming you mean that you have a server\service at 66.221.24.31 that used to be at 83.83.83.83, right? If so, are both ip addresses allocated to your organization and do they both get routed to your network? If yes, then I think you could probably use NAT at your router/firewall to translate anything coming in for the old address to the new address.

Also, if the server\service is for web hosting, email, ftp, etc., etc. why not just change the DNS records for those resources to point to the new address?

Can you elaborate on your question?

share|improve this answer
    
Both IP's aren't routed to the same network. They are completly seperate (and ficitional in the example above) IPs. There is no DNS - just a hardcoded IP. –  Mr. Flibble Sep 17 '09 at 15:35
    
I realize that they're fictional and for illustrative purposes. I see you've accepted an answer, but I'll add my additional two cents anyway: If you're using DNS (which you've said you're not) you would use the hosts file to accomplish this. If you're using only the ip address you would need to come up with a way to NAT the old address to the new one. –  joeqwerty Sep 17 '09 at 16:00

Use Netsh commands for Interface Portproxy: http://technet.microsoft.com/library/cc776297%28v=ws.10%29.aspx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.