|
-
Apr 10th, 2010, 05:23 AM
#1
Thread Starter
Addicted Member
[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
-
Apr 10th, 2010, 11:56 AM
#2
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.
-
Apr 12th, 2010, 05:23 AM
#3
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?
-
Apr 12th, 2010, 06:12 AM
#4
Thread Starter
Addicted Member
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.
-
Apr 15th, 2010, 01:38 PM
#5
Thread Starter
Addicted Member
Re: Redirecting connections
No ideas anyone? If it's of any help, the client thats connection I want to intercept is written in Java.
-
Apr 19th, 2010, 06:55 AM
#6
Thread Starter
Addicted Member
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.
-
Apr 30th, 2010, 09:15 PM
#7
Addicted Member
Re: [RESOLVED] Redirecting connections
or maybe write a inject dll into which program u want to change host.
using hook connect.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|