[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Socksified dpkg-ftp?



Jens B. Jorgensen wrote:
> 
> Stefan Sunaert wrote:
> >
> > Hi,
> >
> > our debian linux box is behind a firewall operating socks4 protocol.
> > The dpkg-ftp package does not seem to use our rftp client, so we cannot
> > use dselect (ftp method).
> > Does anyone have a solution?
> > --
> 
> I'm in the same situation but I don't have a solution. I've thought
> about
> making a Perl package, but I don't know about how to do that, so I
> haven't
> gotten around to it. I think that would probably be easiest. There is
> currently a Socket package. I would make an RSocket package and then
> just
> change the dpkg-ftp perl code to use that package instead. (dpkg-ftp is
> written in perl in case you hadn't caught on).
> 
> Jens B. Jorgensen
> jjorgens@bdsinc.com

I finally got one way to do this (what a weekend!)

One way to do this is to socksify perl.

There's a lot of information on http://www.socks.nec.com/. There, you
will find the sourcecode for the socksserver (sockd) and socksclient
software (such as rftp, and the socks library). There's an archived
mailing list with information on how to build the soft on linux, and how
to socksify a client; see also
http://www.socks.nec.com/how2socksify.html.

Our linux box is behind a socks4 firewall, so I downloaded the socks4
software. After too many trial an error attempts, and after reading the
archived mailinglist on how to compile this on linux, I finally got a
working rftp and a libsocks library. (I didn't get the full soft to
compile cleanly - no rtelnet, no rfinger)

The next step is to socksify the complete perl package (instead of, as
you suggested, make a RSocket package).
I downloaded the debian perl5.003 sourcecode, and modified the
debian.rules, according to the "How to Socksify a client" page
(http://www.socks.nec.com/how2socksify.html): this is:
add the cflags: -Dconnect=Rconnect -Dgetsockname=Rgetsockname
-Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect
and add -lsocks for the libs.

Then type "debian.rules binary", which will make a .deb perl package,
which you can install using dpkg. 
This debian perl package now knowns how to deal with the socks4 server
running on the firewall.

Then the ftp option of dselect worked! (except for DNS; give the IP
address of your local debian mirror - for DNS some more cflags are
needed - see the webpage and the archived mailing list)

I hope this helps.
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Stefan Sunaert, MD               stefan.sunaert@uz.kuleuven.ac.be
 Department of Radiology                      Phone: +32 16 347754
 University Hospital Gasthuisberg             Fax  : +32 16 343769
 K.U.Leuven
 Herestraat 49, B-3000 Leuven (Belgium)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: