[sf-perl] installing CPAN inside firewall
Asheesh Laroia
asheesh at asheesh.org
Tue Aug 8 10:57:42 PDT 2006
Vicki Brown wrote:
> My Current Job (tm) includes a FreeBSD box under the desk. Said box is
> running Perl 5.005 and is accessible via VPN.
>
> I can get out from that box over sftp.
> AFAIK, nothing else much works.
Does ssh (rather than sftp) work? If so, you should be able to use ssh
-D ("dynamic forwarding") to create a SOCKS5 proxy that you can
configure CPAN to use.
Here's a sample:
$ ssh -N -D 1080 remoteusername at remotehost.domain.net
Password: xxxxx
"-N" means "don't run a shell on login"
If your version of SSH is too old to support this, compiling openssh and
copying the resulting ssh binary into your user's $PATH should be easy
enough and would not touch the system's SSH.
Once you've done that, you should be able to configure CPAN to use a
SOCKS5 proxy (host: localhost; port: 1080) and then regular LWP HTTP
should work fine through it since all HTTP will go through the tunnel
made by SSH and through the remote machine.
It might feel like a heavy hammer, but I find it makes life easier when
I'm on frustratingly-restricted networks. You can combine this with the
program "tsocks" to transparently redirect all connect() calls through
the SOCKS proxy created by ssh.
Best of luck!
-- Asheesh.
--
You will be surprised by a loud noise.
More information about the SanFrancisco-pm
mailing list