reverse SSH tunnel problem

reverse SSH tunnel problem

Post by p coope » Fri, 11 Nov 2005 08:18:48



Ive got a reverse tunnel from my work server ot my home server and then i
can get back to work
-------Work--------------   Home--------------------------------home client
Servername=test1         Name=grenada
IP address 10.138.0.10   internal 192.168.0.1              IP=192.168.0.12
running apache

I do

ssh -R 2096:localhost:80 www.myserver
and then go home

http://grenada:2096 from the home client brings up the default apache index
page on the work server

but I want to go to a directory that I access at work as
http://10.138.0.10/mediawiki

with the servername in apache set to test1
when I enter http://grenada:2096/mediawiki on the home client konqueror i
get "unknown host test1"

changing the servername to localhost its "Could not connect to host
localhost."

changing the DocumentRoot to /var/www/localhost/htdocs/mediawiki

-> test1 ( or locahost) not found

Ive added to test1:/etc/hosts
10.138.0.10 localhost
127.0.0.1 test1

and Ive added to grenada :/etc/hosts
127.0.0.1 test1

all to no avail.

Is there a way ?

 
 
 

reverse SSH tunnel problem

Post by Philippe WEIL » Fri, 11 Nov 2005 20:47:14



> Ive got a reverse tunnel from my work server ot my home server and then i
> can get back to work
> -------Work--------------   Home--------------------------------home client
> Servername=test1         Name=grenada
> IP address 10.138.0.10   internal 192.168.0.1              IP=192.168.0.12
> running apache

> I do

> ssh -R 2096:localhost:80 www.myserver
> and then go home

> http://grenada:2096 from the home client brings up the default apache index
> page on the work server

If you use virtualhosting by name on your http server
ssh tunelling doesn't work to access virtual host
Quote:

> but I want to go to a directory that I access at work as
> http://10.138.0.10/mediawiki

> with the servername in apache set to test1
> when I enter http://grenada:2096/mediawiki on the home client konqueror i
> get "unknown host test1"

> changing the servername to localhost its "Could not connect to host
> localhost."

> changing the DocumentRoot to /var/www/localhost/htdocs/mediawiki

> -> test1 ( or locahost) not found

> Ive added to test1:/etc/hosts
> 10.138.0.10 localhost
> 127.0.0.1 test1

> and Ive added to grenada :/etc/hosts
> 127.0.0.1 test1

> all to no avail.

> Is there a way ?


 
 
 

reverse SSH tunnel problem

Post by p coope » Wed, 16 Nov 2005 18:38:58


its not a virtual host configuration

I can get to my apache default installation  
once the tunnel is up

http://serverathome:2096 and I see http://serveratwork:80
the problem is that I cant get to

http://serveratwork:2096/mediawiki

I get a 'serveratwork not found  'apache error message

If I add to me desktop client /etc/hosts
serveratwork  192.168.0.1(serverathome IP address) I get a you must
configure your wiki error message , even though my secretary ( in the
office) can access it

 
 
 

reverse SSH tunnel problem

Post by David Efflan » Tue, 22 Nov 2005 16:55:58



> Ive got a reverse tunnel from my work server ot my home server and then i
> can get back to work
> -------Work--------------   Home--------------------------------home client
> Servername=test1         Name=grenada
> IP address 10.138.0.10   internal 192.168.0.1              IP=192.168.0.12
> running apache

> I do

> ssh -R 2096:localhost:80 www.myserver
> and then go home

> http://grenada:2096 from the home client brings up the default apache index
> page on the work server

> but I want to go to a directory that I access at work as
> http://10.138.0.10/mediawiki

> with the servername in apache set to test1
> when I enter http://grenada:2096/mediawiki on the home client konqueror i
> get "unknown host test1"

I bet http://grenada:2096/mediawiki/ would work.  A trailing slash is
required when no filename is specified, and apache is trying to fix it by
redirecting you there.  See apache docs for UseCanonicalName (setting that
off may help if you are prone to using incomplete URLs).
 
 
 

reverse SSH tunnel problem

Post by JosephK » Thu, 01 Dec 2005 15:06:01



> its not a virtual host configuration

> I can get to my apache default installation
> once the tunnel is up

> http://serverathome:2096 and I see http://serveratwork:80
> the problem is that I cant get to

> http://serveratwork:2096/mediawiki

> I get a 'serveratwork not found  'apache error message

> If I add to me desktop client /etc/hosts
> serveratwork  192.168.0.1(serverathome IP address) I get a you must
> configure your wiki error message , even though my secretary ( in the
> office) can access it

You have hidden NAT in both directions.  you are lucky to get it to work at
all.  HTTP is very tolerant about finding hosts with arp and rarp.  SSH
requires that you understand the NAT both ways.
--
JosephKK