0

I have a WNR3500Lv2 router where I installed the Tomato driver. The TOR configuration window looks like this in the router GUI:

enter image description here

My problem that I don't want to enable TOR for anything else in my home network, just only when I making requests through it's proxy. How can I achieve this?

I want to check URLs through TOR:

$ curl --insecure -v --socks5 127.0.0.1:9050 https://check.torproject.org/

However this command returning this error:

*   Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 9050 failed: Connection refused
* Failed to connect to 127.0.0.1 port 9050: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 127.0.0.1 port 9050: Connection refused

If I running the tor command on the router, this is what I got:

Sep 14 18:49:31.283 [notice] Tor 0.2.9.10 (git-1f6c8eda0073f464) running on Linux with Libevent 2.0.22-stable, OpenSSL 1.0.2k and Zlib 1.2.11.
Sep 14 18:49:31.284 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Sep 14 18:49:31.285 [notice] Configuration file "/usr/etc/tor/torrc" not present, using reasonable defaults.
Sep 14 18:49:31.332 [notice] Opening Socks listener on 127.0.0.1:9050
Sep 14 18:49:31.333 [warn] Could not bind to 127.0.0.1:9050: Address already in use. Is Tor already running?
Sep 14 18:49:31.334 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Sep 14 18:49:31.335 [err] Reading config failed--see warnings above.

I'm including the TOR config file from the router:

SocksPort 9050
AllowUnverifiedNodes middle,rendezvous
RunAsDaemon 1
Log notice syslog
DataDirectory /tmp/tor
TransPort 192.168.2.1:9040
DNSPort 192.168.2.1:9053
User nobody
1

Well, you're seem to querying the wrong host - 127.0.0.1 is a localhost, and you need to query your router's IP - pehaps a copy-paste mistake? And - check the Tor config - SocksPort should be not bound to localhost only - if it is, just add one more line with your router's LAN IP and port 9050

  • I installed tor without browser on my PC and curl works just fine. Maybe the TOR version that installed on the router not have the option to only use SOCKS5. – Lanti Sep 14 '17 at 20:01
  • 1
    the web interface you're looking at is not Tor's one - it is a iptables/pf port redirection rules controller. And tor uses socks just fine for years - all you need is to check/edit tor's config file on your router. – Alexey Vesnin Sep 14 '17 at 20:03
  • I updated my question with the TOR config file from /etc/tor.conf. This is same as the /tmp/etc/tor.conf file. The /usr/etc/tor/torrc file not presented. Can you help which should I edit to get to work the proxy only routing? – Lanti Sep 14 '17 at 20:16
  • SocksPort 9050 should be changed into two lines SocksPort 127.0.0.1:9050 and SocksPort 192.168.2.1:9050. The odd thing that an official doc does not cover - if just port specified, then there's a glitches in socksport directive work, but if all IP's are having their own SocksPort line - it's OK. Make two lines instead of one - and it should be fine – Alexey Vesnin Sep 14 '17 at 20:53
0

You want to change:

SocksPort 9050

To:

SocksPort 192.168.2.1:9050

Then from your networked computer run:

curl -x socks5h://192.168.2.1:9050/ https://check.torproject.org/

This will use the SOCKSPort on the router. Note that all Tor traffic will not be protected with any cryptography on the network, so anyone who can intercept traffic between you and the router (likely anyone on the local network, or anyone within range of the wireless) will be able to see what you're using Tor for.

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.