> For the complete documentation index, see [llms.txt](https://vuahai.gitbook.io/sysadmin-101/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vuahai.gitbook.io/sysadmin-101/ssh/socks-tunneling.md).

# socks tunneling

The following script can help simplify the socks tunnel process:

<pre><code><strong>#!/bin/bash
</strong><strong>
</strong><strong># filename: ssh-tunnel.sh
</strong>
if [[ $# -eq 0 ]]
then
  echo "usage: ssh-tunnel &#x3C;username@server> or ssh-tunnel exit"
elif [ $1 == "exit" ] || [ $1 == "stop" ]
then
  ssh -S /tmp/ssh-tunnel -O exit exit
else
  ssh -fCNMS /tmp/ssh-tunnel -D1080 $1 -p22
fi
</code></pre>

Using Firefox, go to Settings, scroll down to Network Settings, click on Settings and configure like:&#x20;

<figure><img src="https://98247454-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FywJtGXpt0zwSuLv84bOm%2Fuploads%2FpIVwTnXp4sCVrDZipkBb%2FScreenshot%202023-09-02%20at%209.30.42%20AM.png?alt=media&amp;token=c5f8b522-da3b-4cb6-bec5-bb89cb432bd7" alt=""><figcaption></figcaption></figure>
