Link to home
Start Free TrialLog in
Avatar of teken894
teken894Flag for United States of America

asked on

Redirect remote ip request

I have a compiled program (win32) that tries to connect to an ip address (for updates, etc). However, that ip has now changed, and I still want the online connectivity.

I researched how this program connects to the ip, and it tries to connect directly to an ip, not a hostname so editing hosts file is not possible.

Is there any software or hardware solution to "redirect" the remote ip to another ip address? I tried googling it, and I get ICMP redirects and IP tunnelling, both of which are not feasible for my problem.

I would need something similar to ip tunneling, except I "catch" the ip address and then "tunnel" it to another before it reaches outside my LAN or my NIC. That's my guess, but I can't find any suitable software.

Are there packet sniffers or some other hardware solution to redirect a remote ip request via TCP to another remote IP.
Avatar of Voltz-dk
Voltz-dk
Flag of Denmark image

dnat (destination nat) will rewrite the destination in the packet.  Most routers & hardware firewalls can do this.  I don't see why it shouldn't be possible to do with software as well, although I don't know any.  So I guess this isn't of much help, but gives you a term to search for..
Oh, it's also sometimes refered to as bidirectional nat.  (And when I say most routers & firewall can do it, I must admit I've never seen any in the very cheap end that could.  But then I haven't seen many of those).
Avatar of sachin_raorane
sachin_raorane

You are directly accessing the IP, How how will the application come to know that IP dont exists...and then even it come to know how it will come to know now where to redirect... You need to modify your application or either use host name or put condition in the application This is from application point.

Alternately you can make arrengment at your Network level or if u have router u can capture the request of particular IP and redirect it to some other ip

The Following link explains the same http://www.cisco.com/univercd/cc/td/doc/product/wireless/airo1100/accsspts/techref/ipredir.pdf

Check this Application
www.georedirect.com

Cheers & Happy New Year
Avatar of teken894

ASKER

i don't have any fancy networking equipment in home, and so don;t have functionality in my $30 router....that's why im looking for a software application..


I can't change my application as its already compiled (and I lost source code :X)
i looked at geodirect

the problem is that the ip is redirected after reaching a host...i want to redirect the packet because the host (IP) is unreachable and want to redirect it to the current ip...

I need something like ip tunneling, except the "tunneling" should be done before actually reaching the host by means of capturing the packet..

If i can't find any software, looks like I have to write my own :D
is there any proxy server (widows/unix) that changes the dnat? Or is there any software that can change the dnat if i use a windows/unix machine as a gateway...just my intuition..
If you can use a Linux machine as your gateway, that'd make it easy...

   iptables -t nat -I PREROUTING -s 1.2.3.4 -j DNAT --to-destination 5.6.7.8

The above redirects all IP packets destined for 1.2.3.4 to 5.6.7.8.
Whoops my bad that should be -d not -s:

   iptables -t nat -I PREROUTING -d 1.2.3.4 -j DNAT --to-destination 5.6.7.8
ASKER CERTIFIED SOLUTION
Avatar of Tim_Utschig
Tim_Utschig

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial