On my linux box, I created a new service with the following command:
/usr/bin/hts -p /var/opt/hts/PID -F localhost:22 81
That starts the httptunnel server with:
-p to write the PID to the file /var/opt/hts/PID
-F to forward to port 22 on the local host
and finally it is listening on port 81
Next, on my Windows machine, I downloaded the httptunnel package for cygwin. From a cygwin terminal, I could then execute:
htc -P : -A -F 8888 :81
Where:
-P is the proxy address:port
-A is my username:password for the proxy
-F is the port to use on the local machine
followed by my server:port
Once htc is running on my machine, I can do:
ssh -p 8888 -l localhost
Like magic, htc wraps everything inside some http "stuff", hands it off to the proxy, which passes it to my home machine. hts on my Linux box gets rid of the http garbage and passes the packet on to sshd (and visa-versa).
Very nice indeed! Now I can use ssh to tunnel all kinds of apps, like remote desktop, or even firefox.
As a side note, here's how to use my isp for browsing:
ssh -p -l -D localhost:8889 localhost
In Firefox:
Edit --> Preferences
Advanced Tab
Settings
Select "Manual Proxy Configuration", enter "localhost" in the SOCKS host field and port 8889.
Woo Hoo!
No comments:
Post a Comment