I booked a stay at a particular hotel because the web page said "Free WiFi".
It didn't say "all outgoing ports firewalled except for port 80 and a few
other (useless) ones". Not having SSH access is most painful. Luckily,
there's a solution.
You need a web server running Apache and SSH. Enable mod_proxy and
mod_proxy_connect and add this to the first (i.e. default) virtual
host configuration:
<VirtualHost whatever:80>
...
# allow ssh to localhost over http proxy
ProxyRequests on
AllowCONNECT 22
<Proxy localhost>
Order allow,deny
Allow from all
</Proxy>
</VirtualHost>
Reload Apache configuration. The setup is done. (Instructions based on
Tunneling SSH over
HTTP(S) by Dag Wieers.)
On the client side you need proxytunnel. Sadly, it's not
packaged for Ubuntu yet, but compiling from sources is trivial. Edit ~/.ssh/config
and add an entry for your proxied ssh connection:
Host pmyservername
ProxyCommand proxytunnel -q -p myserver.mydomain.com:80 -d localhost:22
That's it. Now you can ssh pmyservername. (The p prefix
is a reminder that I'm using a proxied connection: ssh fridge versus ssh
pfridge. Also it reminds me of Terry Pratchett's Pyramids.).
For extra fun (e.g. IRC) use ssh's built-in SOCKS5 proxy: ssh -D 1080
pmyservername. Then tell the apps to use a SOCKS5 proxy on
localhost. Since telling each app to use a proxy (and then, later, telling it
to stop using it) is a big *pain*, and some apps (e.g. ssh) don't support
proxies directly, a wrapper like tsocks is handy. Edit
/etc/tsocks.conf and set the default socks server to 127.0.0.1, then use
it to run apps:
$ tsocks xchat-gnome
$ tsocks bzr push lp:myprojectname
tsocks is packaged for Ubuntu.
If your hotel doesn't have free WiFi, a prepaid SIM card with 3G access
could be cheaper than roaming charges. Apparently you can get one with a
virtually unlimited (for a short stay, anyway) data plan for 27 EUR in
Amsterdam.