Re: [squid-users] SSH access

From: Denis Vlasenko <[email protected]>
Date: Thu, 25 Mar 2004 16:32:52 +0200

On Thursday 25 March 2004 09:01, Mark Tinka wrote:
> --- David THOMAS <david.thomas@tango.lu> wrote: > Hi,
>
> > I'm wondering if squid will help me to solve this
> > problem.
> >
> > The problem: I have to access a remote server via
> > SSH. But a firewall
> > disallows the access to the port 22.
>
> unless something has changed in all the months i've
> been silent (forgive me), squid is an HTTP proxy, not
> a port_forwarding agent..
>
> > If I install squid on my remote server, could I
> > configure it to forward
> > the port 85 (for instance, an opened port) to the
> > port 22 ?
>
> i don't see how this is possible natively in squid..
> even if it were, u'd still have to involve a firewall
> or some other kind of port_forwarding software...
>
> > So I can configure my SSH software for reaching a
> > proxy server (my remote
> > server) with the port 85.
>
> suggest u try something simple like RINETD.. u can
> port_forward with this to your heart's content.. and
> the best part - u don't have to run squid on the box..

tcpserver + netcat will do the job just fine.
Even inetd + netcat will do.
No need to reinvent wheels.

Example (using daemontools):

#!/bin/sh

user=daemon
ip=0.0.0.0
port=85
maxconn=100
timeout=300
targetip=1.2.3.4
targetport=22

envuidgid $user \
tcpserver \
    -U \
    -v -R -H -l 0 -c $maxconn \
    $ip $port \
nc -w $timeout $targetip $targetport

--
vda
Received on Thu Mar 25 2004 - 07:57:28 MST

This archive was generated by hypermail pre-2.1.9 : Thu Apr 01 2004 - 12:00:03 MST