Hack Forums
Making CLI commands route through tor nodes on Linux - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Computing (https://hackforums.net/forumdisplay.php?fid=88)
+---- Forum: Linux (https://hackforums.net/forumdisplay.php?fid=85)
+---- Thread: Making CLI commands route through tor nodes on Linux (/showthread.php?tid=6282536)



Making CLI commands route through tor nodes on Linux - Biggy_Asian - Oct 16, 2024

I completely forgot torsocks existed and got reminded thanks to @Bastille@.

Torsocks allows you to make all your commands like ssh and other commands which reach out through the internet to instead route through tor nodes before hitting the targeted host. This way you stay extra safe.

Installation:
Code
sudo apt install torsocks && torsocks




Running:

Basic usage:
Code
torsocks curl -X GET "webhook.site/webhookhere"

As you can see my ip from the website after posting is completely different. Compare both below:

[Image: image.png]
[Image: image.png]




Help:
Code
└────╼ ❯❯❯ torsocks                        
torsocks 2.3.0

/usr/bin/torsocks [OPTIONS] [COMMAND [arg ...]]

usage: /usr/bin/torsocks command args

Options:
  -h, --help         Show this help
      --shell        Spawn a torified shell
      --version      Show version
  -d, --debug        Set debug mode.
  -u, --user NAME    Username for the SOCKS5 authentication
  -p, --pass NAME    Password for the SOCKS5 authentication
  -i, --isolate      Automatic tor isolation. Can't be used with -u/-p
  -6, --ipv6         Enable creation of IPv6 sockets
  -a, --address HOST Specify Tor address
  -P, --port PORT    Specify Tor port
  on, off            Set/Unset your shell to use Torsocks by default
                     Make sure to source the call when using this option. (See Examples)
  show, sh           Show the current value of the LD_PRELOAD

Examples:

Simple use of torsocks with SSH
    $ torsocks ssh [email protected] -p 1234

Set your current shell in Tor mode.
    $ . torsocks on

Please see torsocks(1), torsocks.conf(5) and torsocks(8) for more information.



RE: Making CLI commands route through tor nodes on Linux - Bastille - Oct 16, 2024

That's the kind of content I like to see on HF 👀 it's been a while since last time I browsed the darkweb, I'll take a try with this tool to see how it works, thanks for the detailed share !


RE: Making CLI commands route through tor nodes on Linux - Biggy_Asian - Oct 16, 2024

(Oct 16, 2024 10:49 AM)Bastille Wrote:  That's the kind of content I like to see on HF 👀 it's been a while since last time I browsed the darkweb, I'll take a try with this tool to see how it works, thanks for the detailed share !

Good thing you can use tornet and torsocks :D


RE: Making CLI commands route through tor nodes on Linux - Mercury - Oct 16, 2024

This is awesome. Warms my heart when people are active in this section. Great share.