
Remember that when the tunnel was established, you need to configure local applications to use that SOCKS5 proxy. Now that the SSH tunnel is up and running, it's time to configure the web browser (Firefox) to use that tunnel. Step 3: Configuring web browser to use the tunnel The tunnel will keep running because we specified -f option which forks the process to background. (If you don't see it, it means the tunnel did not work - perhaps due to network connection issues, blocked firewall or invalid IP.) This means that the SSH process is up and running. You should see a line in the output, something like this: user 14609 1 0 23:32 ? 00:00:00 ssh -CfNq -D 9999 When we’re done setting up the tunnel above, verify that the tunnel is up and running with this command: ps -ef | grep ssh It’s normal to see no indication of success or failure (because we applied the -q option.) Step 2: Verify the tunnel Once you enter the command above, you'll be brought back to the terminal.

Replace with your remote sudo user and server IP address or domain name. The port can be any user/registered ports or dynamic/private ports which range between 1024-65535.

This works by allocating a socket to listen to port on the local side and optionally bound to specified bind_address.

It tunnels all your web traffic through the remote machine. Why use SSH tunneling?Īs I said above, it can be used to secure yourself when browsing from potential Man-In-The-Middle attacks, firewalls evasion and securing traffic tunneling.

To make all comparison between VPN and SOCKS5 proxy is a large topic, maybe we can cover this later. If all you need to secure is your web browsing, SOCKS5 proxy tunnel is a simple alternative. SOCKS5 proxy requires you to configure the application you are using such as a web browser to use the proxy server. One solution is to use VPN, though using SSH tunnel SOCKS5 proxy can also achieve the same results. More importantly, you also don’t want anyone spying on your activities! Sometimes when we use public wireless hotspots and any other insecure networks, or even if the network has overly restrictive firewall, you cannot browse or access certain websites. But this time, we are going to use the SSH tunnel as a SOCKS5 proxy to our local machine. SSH client is usually used to connect a client to a remote machine securely and for executing commands on a remote computer.
