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: DNS and Netbios name
    ... it will say "give me ServerA ... ClientB has, it will NEVER know to say "give me ServerA in ... what is happening is not a WINS magic, it is just a resolution thing ... whereby client will append the suffixes configured on them to every ...
    (microsoft.public.windows.server.dns)
  • Re: DNS and Netbios name
    ... If there is any process/application that is specifically coded to REQUIRE a specific method of locating such partners, I say that is a coding error and that the vendor needs to be presured to re-code in a way that leverages the native name resolution scheme of the underlying client OS. ... Client or server tries to talk to the other using NetBIOS name. ... Since ServerA is NOT in DomainB.Forest.TLD, ... it does not matter if both ClientB and ServerA were in the same network segment. ...
    (microsoft.public.windows.server.dns)
  • Re: DNS and Netbios name
    ... It should NOT matter to the requesting party whether or not the ... it will say "give me ServerA ... ClientB has, it will NEVER know to say "give me ServerA in ... what is happening is not a WINS magic, it is just a resolution thing ...
    (microsoft.public.windows.server.dns)
  • 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)