General technical discussions.
superkefei
New Member
Posts:
2
Joined:
Sun Jul 01, 2012 2:06 pm

Need help redirect / forward FROM locahost TO another IP

Sun Jul 01, 2012 2:11 pm

This is my situation:

Two computer under the same router, 192.168.1.101 and 192.168.1.102

this is what i like to do:

on 192.168.1.101, while accessing port 22 with localhost, it directs the traffic to 192.168.1.102 port 22.

in another word, i would like to forward whatever traffic from localhost to another local IP.

i tried trivalproxy, it redirects traffics from 127.0.0.1 to the other IP. but it still doesn't redirect LOCALHOST.

i know this is a weird request, but this is the only way can solve my problem.

any suggest?

thanks!

javentre
Post Whore
Posts:
1971
Joined:
Fri Jul 09, 2010 7:38 pm

Re: Need help redirect / forward FROM locahost TO another IP

Sun Jul 01, 2012 2:34 pm

superkefei wrote:on 192.168.1.101, while accessing port 22 with localhost, it directs the traffic to 192.168.1.102 port 22.


You can do that with SSH port forwarding, but it will only work as long as you have the SSH connection established.
http://networking.ventrefamily.com

superkefei
New Member
Posts:
2
Joined:
Sun Jul 01, 2012 2:06 pm

Re: Need help redirect / forward FROM locahost TO another IP

Sun Jul 01, 2012 3:38 pm

let me include some more detail:

i have a application that establish a ssh connection only via localhost (not even 127.0.0.1, i think in the coding is "localhost". that is why even i could redirect the 127.0.0.1, it is still not working).

but i need to redirect this ssh connection to another local ip.

so the redirection need to be established before the ssh connection is established.

any suggestion?

thanks!

javentre
Post Whore
Posts:
1971
Joined:
Fri Jul 09, 2010 7:38 pm

Re: Need help redirect / forward FROM locahost TO another IP

Sun Jul 01, 2012 4:59 pm

superkefei wrote:(not even 127.0.0.1, i think in the coding is "localhost". that is why even i could redirect the 127.0.0.1, it is still not working).
localhost IS 127.0.0.1, so I'm not sure what you're describing. Use something like Putty to setup the tunnel.

superkefei wrote:but i need to redirect this ssh connection to another local ip.
You can ssh from PC1 to PC2, and make it so 22 on PC1 goes to PC3 (via PC2).
http://networking.ventrefamily.com

Otanx
Post Whore
Posts:
1208
Joined:
Wed Sep 01, 2010 3:37 pm
Certs:
CCNP, CEH

Re: Need help redirect / forward FROM locahost TO another IP

Mon Jul 02, 2012 12:00 am

Do you have IPv6 enabled on this system? Remember it is enabled by default on Windows. If it is enabled localhost will point to ::1 not 127.0.0.1. Disable IPv6, and redirect 127.0.0.1 again.

-Otanx
Stay networked, my friends.

'

Return to General Tech

Who is online

Users browsing this forum: Yahoo [Bot] and 20 guests