Networking Forums

Networking Forums > Computer Networking > Linux Networking > ssh forward connection from one host with no proxy

Reply
Thread Tools Display Modes

ssh forward connection from one host with no proxy

 
 
Claudio Miranda
Guest
Posts: n/a

 
      10-02-2008, 06:40 PM
Hi all

I have been trying to use ssh to bypass firewall, see the current
configuration

machines:
laptop_at_work (http internet only)
custssh_server (no internet access)
ssh_outside (can ssh into cutssh_server)

At laptop_at_work I have access to the internet through a proxy, but
my webmail URL is blocked.
At ssh_outside I can do a wget http://www.cnn.com, it works.
So I want ssh_outside who has full internet connection to act as a
proxy/gateway for me at laptop_at_work, using custssh_server as a
middle gateway between me (laptop_at_work) and and the internet
(ssh_outside)

I have tried

at ssh_outside machine
$ ssh -o "GatewayPorts yes" -g -c arcfour -R *:8885:10.9.8.2:80 -N
user@custssh_server

at custssh_server
telnet localhost 8885

Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
GET http://www.cnn.com HTTP/1.0
HTTP/1.1 400 Bad Request
Date: Thu, 02 Oct 2008 19:07:04 GMT
Server: cisco-IOS
Accept-Ranges: none

400 Bad Request
Connection closed by foreign host.


I see the localhost (custssh_server) forwards the request to
ssh_outside machine router, which is 10.9.8.2 at port 80.

I want those requests to go through the 10.9.8.2 gateway, but looks
like they are requesting data at port 80, which is the router port and
obviously is not going to work.

So, I ask if there is any chance to make those requests at
custssh_server goes to the 10.9.8.2 gateway and not the 10.9.8.2:80

Thanks

Claudio
 
Reply With Quote
 
 
 
 
Chris Davies
Guest
Posts: n/a

 
      10-02-2008, 07:58 PM
Claudio Miranda <(E-Mail Removed)> wrote:
> I have been trying to use ssh to bypass firewall


Assuming this is a work environment you'd be better off talking with
your line manager and the system adminstrators. The firewall is there
for a reason. (Even if you don't agree with the reason.)

Chris
 
Reply With Quote
 
Claudio Miranda
Guest
Posts: n/a

 
      10-03-2008, 02:07 AM
On Oct 2, 4:58*pm, Chris Davies <chris-use...@roaima.co.uk> wrote:
> Claudio Miranda <clau...@claudius.com.br> wrote:
> > I have been trying to use ssh to bypass firewall

>
> Assuming this is a work environment you'd be better off talking with
> your line manager and the system adminstrators. The firewall is there
> for a reason. (Even if you don't agree with the reason.)


Thank for your advice, but sysadmin people told me if can keep this
ssh only to my webmail access it is safe.
Currently I already have access to my webmail through a 3G connection
+bluetooth, but its not fast.

I suppose you are a system admin, right ?

Thanks

Claudio


 
Reply With Quote
 
b.jeswine
Guest
Posts: n/a

 
      10-03-2008, 02:35 AM
In news:d0796a71-0bc4-4a13-963c-(E-Mail Removed),
Claudio Miranda <(E-Mail Removed)> typed:

> At laptop_at_work I have access to the internet through a proxy, but
> my webmail URL is blocked.


And why is it blocked? webmail traditionally uses either port 80 or port
443, which the normal proxy doesn't block, so your admins have particular
reasons for limiting your Internet webmail access; you should discuss your
need with them.


 
Reply With Quote
 
Chris Davies
Guest
Posts: n/a

 
      10-03-2008, 10:28 AM
Claudio Miranda <(E-Mail Removed)> wrote:
> Thank for your advice, but sysadmin people told me if can keep this
> ssh only to my webmail access it is safe.


Fine. Just wanted to make the warning!

To clarify your requirement:

* You have three boxes, laptop, custssh_server, and ssh_outside

* You want to get from laptop to a webmail service hosted elsewhere,
but cannot do so directly

* Laptop can only use a web proxy, but that web proxy allows
TCP connections to ports other than 80

* Custssh_server can accept inbound requests, on ports of your
choice from laptop and ssh_outside, but cannot establish them

* ssh_outside is a server under your control that can accept inbound
requests on ports of your choice, and that can connect to
custssh_server using ssh on port 22

* Laptop cannot establish any direct connection with ssh_outside

* Ssh_outside cannot establish any direct connection with laptop


Initally I would suggest that you use ssh from ssh_outside IN to
custssh_server that carries a reverse tunnel to your webmail. Let's have
port 80 on webmail presented as port 8080 on custssh_server:

ssh -R '*:8080:webmail.where.ever:80' custssh_server

You then connect with your web browser to custssh_server on port 8080
and it should all work. (Mind the GatewayPorts option, though.)


However, I see that you've already tried this, and you've got a CISCO
IOS error. Is this your firewall blocking the access? (You didn't say.)

I'm going to assume that the CISCO firewall is between your laptop and
the custssh_server, and that it's monitoring application traffic
regardless of port.

To bypass this you will need to use an http/ssl tunnel instead of
plain http. With purely web based technologies you will need to having
something running on either custssh_server or ssh_outside that unwrapped
https raffic back into plain http before forwarding it on. You would
connect to this (un)wrapper from your laptop using https instead of http.

Try looking at stunnel, or openvpn (which can tunnel https over proxies)

Chris
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forward a connection to a dc server. kefas Linux Networking 0 10-18-2007 04:00 PM
Host-to-host connection in wireless adhoc network? Tim Boneko Linux Networking 0 08-17-2005 05:28 PM
iptables proxy two ips for one host Fritz Bayer Linux Networking 2 07-12-2004 06:50 AM
Linux<->Windows connection using USB host-to-host cable =?iso-8859-2?Q?Rados=B3aw?= Grzanka Linux Networking 0 04-10-2004 03:23 PM
Have squid forward to other proxy on specific port Sjaakie Helderhorst Linux Networking 2 11-03-2003 09:43 PM



1 2 3 4 5 6 7 8 9 10 11