Re: proxy via ssh

From: Brian Pence (bpenceNOSPAM_at_celestialsoftware.net)
Date: 08/22/03


Date: Fri, 22 Aug 2003 11:18:59 -0500

I think what you're looking for is port forwarding from
local client to the server.

-- 
Brian Pence
Author - AbsoluteTelnet Telnet/SSH client
http://www.celestialsoftware.net
http://www.absolutetelnet.com
"cyrustam888" <cyrustam888@hotmail.com> wrote in message
news:913f8d49.0308220150.4080e57b@posting.google.com...
> Dear all ,
>
> I have a question about the proxy through ssh ,
> but i don't know it is possible or not
>
>
> serverA - RedHat Linux 9
> - Squid proxy enabled on port 8080 for 127.0.0.1 only
> - sshd enabled for 0.0.0.0
>
> ClientB - RedHat Linux 9
> ssh client configured to connect serverA
>
>
> I want to use the proxy service on serverA, but only ssh is allowed
> for ClientB,
> So I configured the following
>
> 1. ssh configured properly for user1(rsa,  no password) to connect
> serverA
> 2. create a new service port 8888 on ClientB
> /etc/xinetd.d/sshst
>
>
> service sshst
> {
>         socket_type             = stream
>         wait                    = no
>         user                    = user1
>         server                  = /usr/bin/ssh
>         port                    = 8888
>         server_args             = serverA telnet 127.0.0.1 8080
>         disable                 = no
> }
>
>
>
> /etc/services
> .
> .
> .
> sshst          8888/tcp
> sshst          8888/udp
> .
> .
> .
>
> 3. restart the xinetd
>
>
>
>
> when I issue the command "ssh serverA telnet localhost 8080"
> I got the normal response from squid
>
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET
>
> HTTP/1.0 400 Bad Request
> Server: squid/2.5.STABLE1
> Mime-Version: 1.0
> Date: Fri, 22 Aug 2003 09:53:19 GMT
> Content-Type: text/html
> Content-Length: 1163
> Expires: Fri, 22 Aug 2003 09:53:19 GMT
> X-Squid-Error: ERR_INVALID_REQ 0
> X-Cache: MISS from serverA
> Proxy-Connection: close
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;
> charset=iso-8859-1">
> <TITLE>ERROR: The requested URL could not be retrieved</TITLE>
> <STYLE
type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-s
erif}PRE{font-family:sans-serif}--></STYLE>
> </HEAD><BODY>
> <H1>ERROR</H1>
> <H2>The requested URL could not be retrieved</H2>
> <HR noshade size="1px">
> <P>
> While trying to process the request:
> <PRE>
> GET
>
>
> </PRE>
> <P>
> The following error was encountered:
> <UL>
> <LI>
> <STRONG>
> Invalid Request
> </STRONG>
> </UL>
>
> <P>
> Some aspect of the HTTP Request is invalid.  Possible problems:
> <UL>
> <LI>Missing or unknown request method
> <LI>Missing URL
> <LI>Missing HTTP Identifier (HTTP/1.0)
> <LI>Request is too large
> <LI>Content-Length missing for POST or PUT requests
> <LI>Illegal character in hostname; underscores are not allowed
> </UL>
> <P>Your cache administrator is <A HREF="mailto:root">root</A>.
>
> <BR clear="all">
> <HR noshade size="1px">
> <ADDRESS>
> Generated Fri, 22 Aug 2003 09:53:19 GMT by serverA (squid/2.5.STABLE1)
> </ADDRESS>
> </BODY></HTML>
> Connection closed by foreign host.
>
>
>
>
>
>
> but i can't get any response, when i "telnet localhost 8888" on
> ClientB
>
>
>
> Trying 127.0.0.1...
> Connected to localhost.localdomain (127.0.0.1).
> Escape character is '^]'.
> Trying 127.0.0.1...
> Connected to 127.0.0.1.
> Escape character is '^]'.
> GET
>
>
>
>
>
>
> What's wrong on my configuration,
>
> Please advise
>
>
> Thanks
>
>
>
>
>
> Cyrus


Relevant Pages

  • proxy via ssh
    ... I have a question about the proxy through ssh, ... Squid proxy enabled on port 8080 for 127.0.0.1 only ... ssh client configured to connect serverA ... HTTP/1.0 400 Bad Request ...
    (comp.security.ssh)
  • Re: Adding a sucsriber
    ... Looking for a SQL Server replication book? ... ClientA (subscriber) and now I want to add another subscriber ClientB ... ClientB or I have to do something to the Publication on ServerA ...
    (microsoft.public.sqlserver.replication)
  • Adding a sucsriber
    ... Assuming that there is an exiting replication in place between ServerA and ... ClientA (subscriber) and now I want to add another subscriber ClientB ... Should I just copy the database from the serverA and add a subscription to ...
    (microsoft.public.sqlserver.replication)
  • Re: Telnet redirection
    ... Telnet bad, SSH good. ... Then I saved and opened the session to ServerA. ... Once i was logged into ServerA, i created a new session names AtoB. ...
    (comp.unix.aix)
  • How do I set up a ssh tunnel between two FreeBSD systems ?
    ... I have read the ssh man page and am not getting the results I think I ... I want to telnet to serverA on port 34 and get a response from the ... But when I run that command, it asks me for a password, and I log into ...
    (freebsd-questions)