2

This is a followup of Can Tor be configured to run on all outgoing connections on a server?

I've successfully placed Tor as a transparent proxy over my VPS, however, I'm getting some trouble.

I am trying with

curl http://icanhazip.com

Sometimes, it returns an IP which is different from the original one of the server. Sometimes however, it returns "Couldn't resolve host".

It seems as though every once in a while, if I wait, then curl, it would give the error, and subsequent calls would return an IP like intended.

What could be the cause? How can I further debug this?


curl -v icanhazip.com

Gives me the following:

* getaddrinfo(3) failed for icanhazip.com:80
* Couldn't resolve host 'icanhazip.com'
* Closing connection #0
curl: (6) Couldn't resolve host 'icanhazip.com'
  • Which side is the Tor on of the VPS? – Cammy_the_block Jun 20 '14 at 0:16
  • @Cammy_the_block: What do you mean? Tor is sitting as a service, and all outgoing requests are supposed to be routed through it (and they are). I don't understand what you mean by "what side" though. – Madara Uchiha Jun 20 '14 at 7:28
  • You said "I've successfully placed Tor as a transparent proxy over my VPS". Does that mean that you are routing traffic over your VPS then through Tor or visa versa? – Cammy_the_block Jun 21 '14 at 20:54
  • @Cammy I'm sending request from my VPS to 3rd party services. I'm routing those through tor. – Madara Uchiha Jun 22 '14 at 4:50
  • Did it work before you were routing Tor traffic through a VPS? – Cammy_the_block Jun 24 '14 at 1:35
3
+50

Try curl -v icanhazip.com and play with --connect-timeout --max-time --retry-max-time. +

  • I've added the information to the question. It seems as though the other parameters you mentioned have no effect. – Madara Uchiha Jun 20 '14 at 12:10
  • Try curl -v --socks5-hostname localhost:9050 icanhazip.com – ire60rb600 Jun 20 '14 at 12:32
  • I get this: pastie.org/9308770 – Madara Uchiha Jun 20 '14 at 14:48
  • It worked, you can see the resolved IP at the bottom :) – ire60rb600 Jun 20 '14 at 18:45

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.