SSH Proxy (SOCKS) through remote computer - TCP & DNS

Posted by Moz Morris on Super User See other posts from Super User or by Moz Morris
Published on 2012-03-29T15:34:51Z Indexed on 2012/03/29 17:34 UTC
Read the original article Hit count: 291

Filed under:
|
|

My problem: Need DNS to be resolved through my remote machine.

So I have a REMOTE that I can access from LOCAL via SERVER. This REMOTE can access a host TARGET_HOST. TARGET_HOST is setup in REMOTE's host file like so: 123.123.123.123 TARGET_HOST

I want to be able to access (in the browser & my application) TARGET_HOST from LOCAL. I have setup a 'proxy' like so:

LOCAL to SERVER:
ssh -L 4567:LOCAL:4568 user@SERVER

SERVER to REMOTE:
ssh -D 4568 user@REMOTE

LOCAL's network config is setup to use a proxy on localhost through port 4567.

So, everything is great and I can see TARGET_HOST in my browser. The problem I have is that the DNS doesn't resolve from LOCAL and therefore some code I have going on in my application, fails. Can anyone help me? Can anyone suggest a better method?

© Super User or respective owner

Related posts about ssh

Related posts about dns