Subject: Re: SOCKS5
To: None <netbsd-help@netbsd.org>
From: Julian Coleman <jdc@coris.demon.co.uk>
List: netbsd-help
Date: 05/03/2002 15:01:35
> ftp> open ftp.cesnet.cz
> 
> from the dump it was obvious that it tried to connect via FTP directly 
> to cesnet.cz, ignoring the SOCKS library.

> What am I doing wrong? I didn't find any hints on the web, so I will be 
> very grateful for an instructive information. Thank you in advance.

I've only used socks4, but I imagine that socks5 is similar.  Reading the
"How_to_SOCKSify" document in the source distribution, I added :

  CPPFLAGS+= -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect
  LDADD+= -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lsocks4

to the Makefile for sup/sup and compiled it.  I installed it as rsup and it
works perfectly.  I've also done the same for ssh and scp (installed as
rssh and rscp).  For pkgsrc programs that use configure (e.g. ircII), I
added :

  CONFIGURE_ARGS=--with-socks4=/usr/pkg/lib

to /etc/mk.conf.  I had to `cd /usr/pkg/lib; ln -s libsocks4.a libsocks.a`
because configure looks for -lsocks.

To check if things are working, you could run

	tcpdump host <socks-serer>

or

	tcpdump host <real-host>

to see which way packets are going.

J

-- 
                    My other computer also runs NetBSD
                          http://www.netbsd.org/