[RESOLVED] Redirecting connections
Howdy..
Scenario:
Client tries to connect to server "1.2.3.4:8080" via sockets, but I want it to connect to "localhost:8080" instead. My question is - is there a way to configure a firewall / router to redirect connections directed to certain host, to localhost? If not, are there other ways simpler than writing a system-wide sockets hook?
TIA :)
Re: Redirecting connections
The simplest way (which I think will work for this) is to edit your Hosts file, which should be stored in %system32%\drivers\etc
By default it contains examples and explanations of how to add that kind of thing to it.
Re: Redirecting connections
The hosts file is for resolving host names to IPs, not the other way around ;) so you cannot use it to redirect traffic sent to an IP address to a host name I'm afraid.
What type of router/firewall are you using?
Re: Redirecting connections
Yeah, the hosts file won't do the trick this time, generally good idea though. I'm just using windows firewall and a motorola router.
Re: Redirecting connections
No ideas anyone? If it's of any help, the client thats connection I want to intercept is written in Java.
Re: [RESOLVED] Redirecting connections
Well, I got it sorted out. Eventually I just had to modify the original client a little bit to make it connect to localhost instead.
Re: [RESOLVED] Redirecting connections
or maybe write a inject dll into which program u want to change host.
using hook connect.