[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: run ssh as service for port forwarding



On Mon, Jun 15, 2009 at 12:16:22AM +0800, Zhang Weiwu wrote:
> Hello. We have a great firewall that scans keywords on tcp connections'
> raw data, thus I could not use my http proxy server outside of the
> firewall because both direct connection to the web server and in-direct
> connect to the http proxy are scanned by the firewall.
> 
> My trick is to run 'ssh -L' and configure browser to use http proxy
> server that runs on localhost, which forwards to the real http proxy
> server. However runs ssh -L several times a day is against basic
> principle of using computer: let computer does the repeating task.
> autossh helps but it also occupies a console session which I don't like.

Are you aware of the -D option of ssh? It creates a socks proxy. Now
configure your browser to use that port as sock proxy and, well, things
should work :-)

> 
> I thought about wrapping the proxy server with stunnel, but then I could
> not configure Firefox to connect to http proxy using https protocol.
> Then I think running autossh -L as a system service (not possible
> because it doesn't detach from console).
> 
> What would you recommend then? (TOR is already being used but hardly
> acceptable for very low bandwidth it offers)

We have a package that does something similar with ssh -R .

http://rapid-tunneling.wiki.sourceforge.net/

Feel free to borrow the daemonizing part of
http://rapid-tunneling.git.sourceforge.net/git/gitweb.cgi?p=rapid-tunneling

-- 
Tzafrir Cohen         | tzafrir@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir@cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend


Reply to: