SSH Dynamic Port Forwarding
    May 10, 20241 min read
    arpan

    This is often used to create a SOCKS(Socket Secure) proxy that can be used to tunnel your web traffic through a secure connection.

    Run the SSH command

    ssh -D 8080 -i /path/to/private_key username@your_server_ip

    Replace username with your username and your_server_ip with the IP address or domain of your server.`

    -D 8080: Specifies the local "dynamic" application-level port forwarding.

    Configure your applications:

    Now that the SSH connection is established, you need to configure your web browser or other applications to use the SOCKS proxy. Set the proxy settings to 127.0.0.1 (localhost) and the port you specified (e.g., 8080).

    For example, in Firefox, you can go to Preferences > General > Network Settings and configure the proxy settings there.

    Untitled

    For command-line tools, you can set the HTTP_PROXY and HTTPS_PROXY environment variables.

    SSHCMD

    © 2025 Arpan Pokharel