Digital Bytes avatar

Using an existing SSH Server as a proxy.

digitalbytes

Published: 23 Apr 2018 › Updated: 23 Apr 2018Using an existing SSH Server as a proxy.

Using an existing SSH Server as a proxy.

Ok this one is assuming that you already have an SSH connection that you use to access your computer. This allows you to use your SSH server as a proxy.

ssh -p (remoteport) -D (portforsocks) (remotehost) -Nf

The remote port is the port your SSH, by default it is 22 but for security purposes you should use another port.
The port for socks is the port you want to be utilized by your browser. This does not need to be configured on the server side.

-N don't run commands on the server
-f run as a damon

Be aware that this does not forward DNS requests these requests will go through your LAN by default.

After the set up tell your browser to use your proxy to connect to the web.

If you run -f and run as a damon close the connection by closing the process.

Must close through ps kill

ps -Afl|grep ssh

kill process

Leave Using an existing SSH Server as a proxy. to:

Written by

A place for my technical notes about Linux. From the basics to the advanced.

Read more #linux posts


Best Posts From Digital Bytes

We have not curated any of digitalbytes's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Digital Bytes