Published: 2020-05-04
Last updated: 2020-05-13 21:19
It is really simple to set up a proxy through a Linux server that runs SSH. The simplest way is to use the SOCKS5 procol which utilizes an open SSH tunnel and forwards all traffic through it.
The instructions below are split into separate parts depending on your host OS:
The proxy settings can be set globally through the Internet Options control panel
localhost:<port>
(i.e. localhost:9001
in our example) to the Socks row. $ ssh -D 9001 -f -C -q -N <your_linux_server_that_runs_ssh>
How to do this varies from OS to OS. Here is a guide that covers Ubuntu 18.04.
A nice feature with that is the NO_PROXY
environment variable that can be used for ignoring patterns where the proxy should not be used, e.g. the company intranet.
export NO_PROXY=localhost,127.0.0.1,*.my.lan.domain
[1] https://itblogsec.com/how-to-make-socks-proxy-server-by-using-raspberry-pi/
[2] https://www.reddit.com/r/raspberry_pi/comments/5ltq3h/rpi_as_a_socks_proxy_and_ssh_file_server_tutorial/
[3] https://www.reddit.com/r/techsupport/comments/4j0l35/windows_10_route_all_traffic_through_socks5_proxy/