Take the 2-minute tour ×

My network is set up like this

S1 -> Switch <- S2 -> Internet

S2 is running an SSH service that I want to tunnel all traffic through.

I installed tsocks on S1 and set up the tsocks.config file like this:

server =
server_port = 1234
server_type = 5

then on S1 I ran this command:

ssh -D 1234 S2

then on S1, in a new terminal window, I ran

tsocks wget google.com

and got the "unable to resolve host address" error.

If someone could help me out I would really appreciate it!! (P.S I am running CentOS on both machines)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

the problem is not with tsocks - but with DNS server

share|improve this answer
Can you please clarify? My coworker said he modified the iptables - could that be the cause? (note I can still access the internet from S2 just fine) –  Mikhail Furlender Aug 31 '12 at 17:52
see the man page: linux.die.net/man/8/tsocks : tsocks will normally not be able to send DNS queries through a SOCKS server since SOCKS V4 works on TCP and DNS normally uses UDP. Version 1.5 and up do however provide a method to force DNS lookups to use TCP, which then makes them proxyable. This option can only enabled at compile time, please consult the INSTALL file for more information. –  jdevelop Aug 31 '12 at 17:55

Your Answer


