

Localtunnel: Show localhost to the rest of the world - rohshall
http://progrium.com/localtunnel/

======
progrium
The one day I get bored and check Hacker News, localtunnel is again on the
front page. I'm really happy people appreciate it and people keep discovering
it. I just want to apologize for neglecting it for so long. People continue to
use it despite a few bugs that I've never addressed.

When I get back from vacation, I'm going to focus on releasing v2, which has
been in the works for a while. It will continue to be a free service supported
by me and hopefully someday the community. Twilio is mentioned, but only
because I worked for them recently. Their designer also threw together the
website design.

I also want to point out that with version 2 coming out, I'd love input on how
to cultivate more community involvement and contributions. I want localtunnel
to live for as long as people want to use it, but I will probably move on from
it much sooner.

Anyway, thanks again!

~~~
rmanalan
Thanks for building this. I use this all the time.

------
krenoten
In case you want to access localhost on a server you're working remotely on,
and would rather show localhost to your local machine than the world:

$ ssh -N <user>@<yourserver> -L <localport>/localhost/<serverport>

so if I'm bob at bobsbookwonderland.com, and I run a test server there on its
localhost 5000 that I want to access from home, I'd type (from home):

$ ssh -N bob@bobsbookwonderland.com -L 5000/localhost/5000

and then on my local machine I'd just point my web browser to localhost:5000
as if I were running the test server locally.

~~~
veyron
The right way to do it is:

    
    
        $ ssh -N -L <localport>:localhost:<serverport> <user>@<yourserver>
    

and

    
    
        $ ssh -N -L 5000:localhost:5000 bob@bobsbookwonderland.com 
    
    

(the : is standard syntax used on platforms, including OSX and PuTTY, and some
platforms don't support getopt arguments after the first non-flag argument)

~~~
shabble
Another useful setting is

    
    
        -g      Allows remote hosts to connect to local forwarded ports.
    

if you want to allow non-local connections.

------
simonw
"gem install X" never, ever works for me on the first try (on OS X AND on
Ubuntu, as someone who rarely does any Ruby hacking). I wish packages like
this would include a link to somewhere that helps troubleshoot things when
they go wrong.

Last time I used localtunnel I eventually figured out I needed to run "sudo
apt-get install ruby1.9.1-dev" first.

~~~
lukeholder
well yeah you need ruby to run a ruby gem?

~~~
simonw
I had ruby - I was missing the ruby-dev header files.

My original complaint though is that people are using "gem install" as the
sole documentation for installing a general purpose command-line tool. I'd
rather not even know it's written in Ruby (I just want to install it and use
it) - instead, I need deep Ruby knowledge just to get the thing running.

~~~
progrium
I hate that it's using gem for install, too.

------
vidar
<http://pagekite.net/> is a great alternative (Python based)

~~~
HerraBRE
Author of PageKite here - funny to see this reposted yet again. :-) In case
anyone has any comments/questions/... we're listening.

Also, if you haven't checked out PageKite in a while, the most recent 0.5
release fixes a lot of minor issues the older versions had, it may be worth
another look, especially if folks are using Windows or aren't based in "the
west" (we recently deployed a relay server in Asia, in addition to our
American and European relays).

~~~
Osmose
FYI: In Firefox 17 on Snow Leopard there's a "skip to navigation" link way to
the right (like 10000px or so) that I can scroll sideways to on your homepage.
I only noticed because I'm using a trackpad. :D

~~~
HerraBRE
Thanks for pointing that out! Sounds like a bug.

------
lukeholder
great service, although it has been posted before.

The popular alternative was <https://showoff.io> but this is a payed service.
I believe local tunnel is free because it is sponsored by twilio.

I also recommend <http://xip.io> for sharing within the same network.

------
baud
<http://proxylocal.com> does the same also and the code is open-sourced

------
lysol
Here's one that's shell-based: <http://i8a.be/>

~~~
HerraBRE
Very, very nice. Did you write it?

~~~
lysol
Nope, but a friend did.

------
tomjakubowski
Could this be used to tunnel something other than HTTP?

~~~
HerraBRE
I don't think Localtunnel can, but PageKite will carry any TCP stream as long
as the client knows how to prefix its request with an HTTP CONNECT preamble.
This has mostly proven popular for remote administration via. SSH, since most
SSH clients can easily be configured to take advantage of this:
<http://pagekite.net/wiki/Howto/SshOverPageKite/>

We are also quite open to the idea of supporting other protocols, but it turns
out relatively few Internet protocols are amenable to "name based virtual
routing" (the same thing as name based virtual hosting, except routing
connection streams by name instead of serving local content).

~~~
_delirium
That's pretty neat. When I need to make a firewalled machine SSHable I
typically set up an 'ssh -R' reverse tunnel to a VPS, and then do a two-step
connect (ssh to the VPS, ssh to localhost through the tunnel). PageKite seems
like it might be a more convenient way to get that up and running.

~~~
HerraBRE
Obviously, I am biased, but I use this _all the time_.

It's just so nice to be able to use ssh and rsync and git and all the other
standard tools to interact with mobile and virtual devices, no matter what
kind of network connection they have. The .deb/.rpm packages just make this
feature part of the OS as far as I am concerned.

------
ra
localtunnel, hmmm sounds familiar...
[http://www.hnsearch.com/search#request/submissions&q=loc...](http://www.hnsearch.com/search#request/submissions&q=localtunnel&start=0)

------
darkstalker
What's the difference between this and opening a port in your router?

~~~
karolist
I think this is targeted at users who don't have the ability to forward ports
on their routers.

