SSH as a quick and cheap VPN using tsocks

Eric P
2017-10-12 23:28


Very simple:

sudo ap-get install tsocks -y

Once installed, edit config file

nano /etc/tsocks.conf

Go all the way down and replace, server with your loopback IP and server port, to whatever you want as long as it not being used by other apps.


server =

# The port defaults to 1080 

#Change port as needed
server_port = 1098


Now to connect from another location

ssh -D 1098 -p22 ;

Note: you don't need to change or add any forwarding to port 1098 from the router, you only need to forward port 22 or whatever you use for SSH to that machine.


Once you have successfully connected, open a new terminal (Don't use the same) and type:

tsocks firefox

or try any other browser or compatible app.

such as 

tsocks midori

tsocks google-chrome

tsocks thunderbird

tsocks filezilla


Make sure these apps are not already open, for example for my local browsing I use chrome, and for my tsocks connections I use firefox or midory, you can create independent links to these apps so you know where you are connecting to.



Tags: firefox, tsocks, VPN
Average rating: 0 (0 Votes)

You cannot comment on this entry