Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alias IP Address

Status
Not open for further replies.

NiceButDim

Programmer
Feb 12, 2002
154
0
0
GB
Hi,
This could be a dumb question cause it's something that i know little about, and maybe i'm posting it in the wrong place as well!, but here goes.

I am trying to run some old code (which we cant change for the moment) that accesses a box on a customer's network. We cannot access that box using the IP address that the code uses due to firewall issues. We do however have an alternative IP address that does allow us to access the box. My question is, is there a way, via the hosts file or whatever, that will result in the IP address that does work being used in place of the one that doesn't.

Thanks in advance.

john.
 
If the address is in IP format, such as xxx.xxx.xxx.xxx, then you are bypassing the traditional ways to "hook" that address and do a substitution; i.e., you are bypassing HOSTS file, DNS, proxy server, .etc.

If the request was in URL format, you could indeed make an entry in HOSTS to bypass DNS and substitute an IP.

You do not give any details on this application, but lets say it is called pencil.exe :

. Make a copy of pencil.exe as pencil2.bin
. Use a hex editor to find the place in pencil2.bin in which your "bad" IP address is listed. Edit the IP with your "good" IP. Search for all instances of the "bad" IP and replace with the "good" IP address.
. rename pencil2.bin pencil2.exe
. run pencil2.exe and test
 
Thanks for the reply.

I suspected that there wasn't a way around this, thanks for confirming it.

john.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top