3

I'm trying to download a file using wget, but I've exceeded (without knowing there was a limit) the limit of downloaded bytes for my IP address, which means that I can't download anymore the files I was downloading repeatedly by re-running a script.

I was essentially trying to re-running a shell/bash script (somehow testing if it works correctly), but I can't do it anymore until I fake my IP address. So, I decided to install tor and torsocks and execute the following commands:

echo | tor &
torsocks wget <some_url>

but it doesn't work. I've never really got into tor (and even less torsocks), so I'm not sure if that's the right tool for this case. Any help is appreciated.

Note: I know a little bit about the tor network, and I thought that in general it should create a proxy and not show my IP address to the world, but apparently that's not exactly what's happening.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232

1 Answers1

1

torify as a nice frontend for torsocks which makes life far easier. It automates and simplifies the setup of torsocks in the background, making it as simple as simply invoking torify before the intended commands.

What you need to run to put to work any program that uses TCP connections in the Tor network are the steps bellow:

  • run the tor daemon; if in Debian do:

    sudo apt-get install tor
    sudo service tor start
    

    if in MacOS (tested with Sierra 10.12.2 beta, MacPorts 2.3.5):

    sudo port install tor
    sudo port install torsocks
    tor &
    
  • call in the command line most of the tools whose communications are based in TCP with torify. For instance:

    torify wget ...
    

or

    torify ssh ...

From man torify:

torify is a simple wrapper that attempts to find the best underlying Tor wrapper available on a system. It calls torsocks with a tor specific configuration file.

torsocks is an improved wrapper that explicitly rejects UDP, safely resolves DNS lookups and properly socksifies your TCP connections.

   Please note that since both method use LD_PRELOAD, torify cannot be applied to 
suid binaries.
Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232