2

I am trying to get Tor relay working and I obviously have done some thing wrong, as I keep getting the torsocks PERROR when testing.

I entered the command curl https://api.ipify.org and get 82.3.5.110 as reply. I then try torsocks curl https://api.ipify.org and always get the error:

steve@TorServer:torsocks curl https://api.ipify.org
[Apr 25 11:41:33] PERROR torsocks[2893]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:185)
curl: (6) Could not resolve host: api.ipify.org

The debug output is:

steve@TorServer:/etc/tor$ torsocks -d curl https://api.ipify.org
[Apr 25 14:36:17] DEBUG torsocks[3814]: Logging subsytem initialized. Level 5, file (null), time 1 (in init_logging() at torsocks.c:286)
[Apr 25 14:36:17] DEBUG torsocks[3814]: Config file not provided by TORSOCKS_CONF_FILE. Using default /etc/tor/torsocks.conf (in config_file_read() at config-file.c:531)
[Apr 25 14:36:17] DEBUG torsocks[3814]: Config file setting tor address to 127.0.0.1 (in set_tor_address() at config-file.c:179)
[Apr 25 14:36:17] DEBUG torsocks[3814]: Config file setting tor port to 9050 (in set_tor_port() at config-file.c:142)
[Apr 25 14:36:17] DEBUG torsocks[3814]: [config] Onion address range set to 127.42.42.0/24 (in set_onion_info() at config-file.c:108)
[Apr 25 14:36:17] DEBUG torsocks[3814]: Config file /etc/tor/torsocks.conf opened and parsed. (in config_file_read() at config-file.c:560)
[Apr 25 14:36:17] DEBUG torsocks[3814]: [fclose] Close catched for fd 4 (in tsocks_fclose() at fclose.c:45)
[Apr 25 14:36:17] DEBUG torsocks[3814]: [onion] Pool init with subnet 127.42.42.0 and mask 24 (in onion_pool_init() at onion.c:104)
[Apr 25 14:36:17] DEBUG torsocks[3814]: [onion] Pool initialized with base 0, max_pos 255 and size 8 (in onion_pool_init() at onion.c:132)
[Apr 25 14:36:17] DEBUG torsocks[3814]: Close catched for fd 4 (in tsocks_close() at close.c:33)
[Apr 25 14:36:17] DEBUG torsocks[3814]: Close catched for fd 5 (in tsocks_close() at close.c:33)
[Apr 25 14:36:17] DEBUG torsocks[3814]: [socket] Creating socket with domain 10, type 2 and protocol 0 (in tsocks_socket() at socket.c:33)
[Apr 25 14:36:17] DEBUG torsocks[3814]: IPv4/v6 non TCP socket denied. Tor network can't handle it. (in tsocks_socket() at socket.c:59)
[Apr 25 14:36:17] DEBUG torsocks[3814]: [getaddrinfo] Requesting api.ipify.org hostname (in tsocks_getaddrinfo() at getaddrinfo.c:44)
[Apr 25 14:36:17] DEBUG torsocks[3814]: Resolving api.ipify.org on the Tor network (in tsocks_tor_resolve() at torsocks.c:527)
[Apr 25 14:36:17] DEBUG torsocks[3814]: Setting up a connection to the Tor network on fd 4 (in setup_tor_connection() at torsocks.c:350)
[Apr 25 14:36:17] PERROR torsocks[3814]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:185)
curl: (6) Could not resolve host: api.ipify.org
[Apr 25 14:36:17] DEBUG torsocks[3814]: [onion] Destroying onion pool containing 0 entry (in onion_pool_destroy() at onion.c:148)
[Apr 25 14:36:17] DEBUG torsocks[3814]: [fclose] Close catched for fd 2 (in tsocks_fclose() at fclose.c:45)

Anyone can tell why the error appears and how to handle it?

The torrc I tried to add it to the question and I was told I cant as I dont have 2 points to my name?

torsocks.conf

TorAddress 127.0.0.1
TorPort 9050
OnionAddrRange 127.42.42.0/24

I have tried adding the torrc file but get an error message "You neeed at least 10 reputations to post more than 2 links"

So how do I get help if I cant post it? - and I do need help here

2
  • Edit your question to include the output. Also please provider your torrc file contents in your question.
    – cacahuatl
    Apr 25, 2017 at 14:05
  • I use Tor Browser
    – Ysblik
    Apr 25, 2017 at 17:23

1 Answer 1

2

If you want to use Tor Browser's Tor instance you'll have to use TorPort 9150. Alternatively, you can install a global Tor instance.

This doesn't work if you're running the alpha version of Tor Broswer on a Unix-like system, it uses a Unix socket instead. You should also expect the stable series to switch to Unix sockets before long.

2
  • ok i'm away for 2 days a will try and sort out what you need me to do . thanks
    – Ysblik
    Apr 25, 2017 at 22:10
  • @Ysblik Please don't edit the answers to add questions. To answer your question, open the config menu →click the '?' → About Tor Browser, if you see "You are currently on the alpha update channel" then your using alpha. Also, unless you picked a browser from the "Experimental Tor Browser" section on the download page your not running alpha. May 1, 2017 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .