0

I'm using a VPS for some development but the VPS is basically disconnected from the internet and im unable to connect to it directly unless i go through a proxy at my home.

But when on the go I need to connect to it using my home proxy. Is there some way i can do:

Laptop -> ssh -> local proxy -> server 

so basically i want to connect to my home computer using SSH, and use the internal proxy on my home computer.

I was thinking of doing something with ssh me@home -D1234 and then tell the browser to use socks5 on localhost:1234 but i cant get my head around how to use the internal proxy on the server.

So my question is, is there some way i can do a direct redirect from

laptop:1234 -> home:8080 

using my home localhost proxy?

1 Answer 1

0

Basically you are looking for ssh port forwarding ( -L option)

ssh -L 1234:your.remote.host:8080 [email protected] 

You are telling ssh to forward all the traffic received on local port 1234 to remote port 8080.

-L local_socket:remote_socket

Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side. This works by allocating a socket to listen to either a TCP port on the local side, optionally bound to the specified bind_address, or to a Unix socket. Whenever a connection is made to the local port or socket, the connection is forwarded over the secure channel, and a connection is made to either host port hostport, or the Unix socket remote_socket, from the remote machine.

Port forwardings can also be specified in the configuration file. Only the superuser can forward privileged ports. IPv6 addresses can be specified by enclosing the address in square brack‐ ets.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.