0

I am running Tails OS on a live USB and am attempting to run traffic through Tor.

The Tor Browser is working via the SOCKS5 proxy on 127.0.0.1:9050.

When I try to run:

curl --socks5-hostname localhost:9050 https://check.torproject.org

I get:

curl: (7) Failed to connect to localhost port 9050: Connection refused

The Tor service is running on ports 9050 and 9150, but I cannot connect to either of them via anything other than the browser.

Trying:

torify -P 9050 curl https://check.torproject.org

Returns:

curl: (6) Could not resolve host: check.torproject.org

And:

torify -P 9150 curl https://check.torproject.org

The same:

1634724584 PERROR torsocks[23634]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:202)
curl: (6) Could not resolve host: check.torproject.org

/etc/tor/torrc:

# This file was generated by Tor; if you edit it, comments will not be preserved
# The old torrc file was renamed to torrc.orig.1, and Tor will ignore it

AutomapHostsOnResolve 1
AutomapHostsSuffixes .exit,.onion
AvoidDiskWrites 1
ClientTransportPlugin obfs2,obfs3,obfs4,meek_lite exec /usr/bin/obfs4proxy managed
ControlPort 127.0.0.1:9052
DNSPort 5353
Log notice file /var/log/tor/log
RunAsDaemon 0
SocksPort 127.0.0.1:9050 IsolateDestAddr IsolateDestPort
SocksPort 127.0.0.1:9150 IsolateDestAddr IsolateDestPort 
SocksPort 127.0.0.1:9062 IsolateDestAddr IsolateDestPort
SocksPort 10.200.1.1:9050 IsolateSOCKSAuth KeepAliveIsolateSOCKSAuth
TransPort 127.0.0.1:9040
WarnPlaintextPorts 23,109

3 Answers 3

0

I didn't use this recently, but you could try

  • curl https://check.torproject.org, at some point curl was automatically torified
  • torify curl https://check.torproject.org if the first option does not work
1
  • Running torify curl https://check.torproject.org gives the output 1634722466 PERROR torsocks[21583]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:202) curl: (6) Could not resolve host: check.torproject.org Oct 20, 2021 at 9:35
0

This is a Tails bad architecture playing tricks on you: Tor is fine working with any SOCKS5 or HTTP client via the corresponding port. As far as I remember - it was a firewall rules for that in Tails, check your firewall tables. And if you need a proper OS-wide security without problems and with a greater security and convenience - check out a QubesOS

0

Could you check your /etc/hosts for entry starting with ::1 for localhost?

If you have it, please try:

curl --socks5-hostname 127.0.0.1:9050 https://check.torproject.org

You can also try adding SOCKS port listening on ::1 address to your torrc:

SocksPort [::1]:9050 IsolateDestAddr IsolateDestPort

You must log in to answer this question.

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