This question already has an answer here:

I used to have my PC on Windows and use Putty to forward internet traffic so it would get through my VPS (located in another country) and give me the opportunity to look like I'm located there whenever I needed it. I would connect putty to my server, define a dynamic port forwarding, and then change Firefox settings to use this port as a proxy.

I do not have the slightest idea on how to do this from my fresh Ubuntu install. Can anyone help?

Thanks ahead!

marked as duplicate by waltinator, pa4080, David Foerster, karel, Melebius May 23 '18 at 8:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You can set up a socks proxy with ssh command with -D option.

-D [bind_address:]port

[...] allocating a socket to listen to port on the local side, optionally bound to the specified bind_address.
Whenever a connection is made to this port, the connection is forwarded over the secure channel, and the application protocol is then used to determine where to connect to from the remote machine. Currently the SOCKS4 and SOCKS5 protocols are supported, and ssh will act as a SOCKS server.


ssh -D 8080 username@sshd_server

After that, set the browsers proxy option to use socks5 proxy (via)

  • Perfect, exactly what I was hoping for, thanks ! – Jeremy Belolo May 22 '18 at 15:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.