10

I'm a Linux Mint (Lisa) and Tor Bundle user trying to use wget over Tor. After following the directions I found here, all I get when running wget is an output file saying, "514 Authentication required."

Here's what I did: I downloaded the latest version of Tor Bundle (Version 2.2.35-9) for Linux and extracted it. I ran ./start-tor-browser. Then in Vidalia I went into Setting -> Advanced, and uncheck "Configure ControlPort automatically." (Later I also tried changing "Authentication" to "None" but this still didn't work.) The IP address is set to localhost and the port is 9051.

From the terminal I said:

export http_proxy="http://127.0.0.1:9051"
wget -proxy=on www.whatismyip.com

This gave me an output file saying, "514 Authentication required" instead of www.whatismyip.com. Any ideas?

  • i've read that both TOR and Vidalia have configuration files, look for the words user or password there and see if it's not as you'd think like maybe there's some username or password there. – barlop Mar 26 '12 at 4:27
15

on Ubuntu or Debain, install package "torsocks"

sudo apt-get install torsocks

After that, use wget like this:

torsocks wget http://foo.onion/data.bar
  • doesn't work for me. 05:19:02 libtorsocks(22594): SOCKS server refused connection tor running on 9050 port, and it seems to be this beast does it on 127.0.0.1:80 – holms Sep 25 '14 at 2:21
  • torify --help says, torify is now just a wrapper around torsocks(1) for backwards compatibility. – palswim Jun 24 '17 at 21:47
4

Tor standalone only includes a SOCKS proxy for connecting to the Tor network, and the Tor browser bundle doesn't add any additional proxies.

The usual method of dealing with programs that require an HTTP proxy is to install one of your own, such as Privoxy or Polipo, then chain that proxy to Tor. For instance, in Privoxy's configuration, you would specify:

forward-socks5  /  127.0.0.1:9050 .

Privoxy then listens on port 8118 and you configure your HTTP proxy setting to http://localhost:8118.

Unfortunately it appears that Linux Mint doesn't carry either of these packages in its repositories. You might consider switching distributions, or compiling one yourself.

2

Use Torify, which is a simple wrapper for torsocks and Tor, for example:

$ torify curl ifconfig.me
$ torify wget -qO- -U curl ifconfig.me

Before using, make sure your Tor server is up and running.

See also: How to anonymize the programs from the terminal? at Tor SE

  • This is probably the easiest solution for most people. – A.Danischewski Jun 22 '15 at 22:17
  • As torify --help says, torify is now just a wrapper around torsocks(1) for backwards compatibility., so this answer is identical to the torsocks answer. – palswim Jun 24 '17 at 21:47
0

Maybe www.whatismyip.com is checking X-Forwarded-For header and trigger an error.

I recommend you to test another one (this is my own, so I know there's no detections of any kind, just your public address) : http://sputnick-area.net/ip

Edit: I think you should remove -proxy switch while it's not in man wget. IIRC, wget can detect the proxy itself. :

wget -q -O - www.whatismyip.com
  • I have the same problem with sputnick-area.net/ip. But nice thinking though, it was a good idea to test that. – Asher Walther Mar 26 '12 at 1:33
  • See my edited post above – Gilles Quenot Mar 26 '12 at 1:42
  • could drop the -q too it looka from the man page thta -q is about supressing output. What is -0 ? – barlop Mar 27 '12 at 19:45
  • 1
    -q simply hides the progress meter – Gilles Quenot Mar 27 '12 at 21:34
  • 1
    you haven't answered the question =/ – holms May 5 '12 at 2:59
0

proxychains also does the job, with the following configuration

socks5 127.0.0.1 9150

$proxychains curl ifconfig.me ProxyChains-3.1 (http://proxychains.sf.net) |DNS-request| ifconfig.me |S-chain|-<>-127.0.0.1:9150-<><>-4.2.2.2:53-<><>-OK |DNS-response| ifconfig.me is 219.94.235.40 |S-chain|-<>-127.0.0.1:9150-<><>-219.94.235.40:80-<><>-OK 178.63.97.34

0

torify seemed to work for me:

 torify wget https://www.some_url.com

Here's the access.log entry from my webserver:

207.244.70.35 - - [13/Sep/2018:03:57:25 +0000] "GET / HTTP/1.1" 200 8446 "-" "Wget/1.17.1 (linux-gnu)" "207.244.70.35" response-time=0.02

207.244.70.35 is not my real IP and therefore this command works

Here is a python script that does the same thing that I found here

#! /usr/bin/python3
import subprocess
from subprocess import Popen, PIPE
import sys
import os


# use torify to make a wget 
class Wgettor():
    def __init__(self, url):
        if not self.__is_activated():
            print("Ensure Tor service is running")
            sys.exit()
        else:
            self.url = url
            self.wget()

    # ensure Tor service is running
    def __is_activated(self):
        service_cmd = "service --status-all | grep tor"
        p = subprocess.Popen(service_cmd,
                             shell=True,
                             stdout=PIPE).communicate()[0]
        return "+" in str(p)

    def wget(self):
        prox = [
            "torify", "wget", self.url
        ]
        os.system(" ".join(prox))


if __name__ == "__main__":
    Wgettor("https://www.some_url_here.com")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.