You are not logged in.

#1 2006-11-13 13:27:47

cmp
Member
Registered: 2005-01-03
Posts: 350

HTTP Proxy via SSH

Hi.
I have the following problem: I need to access certain internal html pages from a webserver, which denies access with my ip, but I got an ssh account for a computer able to access the http server.
Do you know any way to access these pages with a browser? (I need to post data, etc..).

cmp

Offline

#2 2006-11-13 13:42:05

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: HTTP Proxy via SSH

You can map the remote-port via ssh to a local-port and you can browse at localhost:8080 for example:

ssh -C -L 8080:<webserver>:80 <loginserver> -l <user>

Offline

#3 2006-11-13 13:53:59

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: HTTP Proxy via SSH

for example: If I wanted to browse google I'd use
ssh -C -L 8080:www.google.de:80 my_sshserver.org -l cmp ?

Offline

#4 2006-11-13 15:06:15

F
Member
Registered: 2006-10-09
Posts: 322

Re: HTTP Proxy via SSH

Worst case scenario you could always wget the pages you need to browse to the ssh account, and then bring those pages to your machine and browse them locally.

Offline

#5 2006-11-13 15:15:25

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: HTTP Proxy via SSH

I thought about it, but the pages need cookie-based authentication, so I would need to send / save cookies and post data. and that all by commandline is a royal pain.

Offline

#6 2006-11-16 07:36:13

F
Member
Registered: 2006-10-09
Posts: 322

Re: HTTP Proxy via SSH

cmp wrote:

I thought about it, but the pages need cookie-based authentication, so I would need to send / save cookies and post data. and that all by commandline is a royal pain.

Have you tried looking at an application called cURL?. It has a cookie parsing engine.

Offline

Board footer

Powered by FluxBB