Local tunnels. Exposes your localhost dev server to global internet. > stdout.in Ievgen Kuzminov IT blog

Local tunnels. Exposes your localhost dev server to global internet.

Nov 14, 2015, 1:35:07 PM

The solution for a question "how do I expose a local server behind a NAT or firewall to the internet?". Literally when your dev machine does not have a dedicated IP, but you need to...

  • make a demo of localhost web app (and can not deploy it to some server)
  • make a quick test of web app (api) on your mobile device
  • accept a webhook from some service or oAuth redirect

Local tunnels allows you to easily share a local web service development machine without messing with DNS and firewall settings. And here are some free tools...

ngrok

Very powerful standalone tool. Has a lot of paid options, but very basic are given for free.

  • no dependencies, just download ngrok binary
  • web page with connection stats
  • supports config file

Expose localhost:3000 as easy as `{.sh} ngrok http 3000 `
You'll get url like this https://83832de1.ngrok.io

Localtunnel

  • requires NodeJS
  • limited options support
npm install -g localtunnel

start a tunnel `{.sh} lt --port 8000 ` You will receive a url, for example https://gqgh.localtunnel.me

Vagrant Share

If you already use Vagrant - the easies way is to use `{.sh} vagrant share ` You will need to make one time registration at https://atlas.hashicorp.com/, then to run vagrant login with registered credentials.

Vagrant detects where your HTTP server is running in your Vagrant environment and outputs the endpoint that can be used to access this share.
You'll get url like this http://lucky-man-7777.vagrantshare.com

  • any port
  • supports SSH sharing via vagrant share --ssh
comments powered by Disqus
Ievgen
Kuzminov "iJackUA"
Web Team Lead
at MobiDev (Kharkiv, Ukraine)
Code in Ruby and Elixir, but still love PHP. Explore ES6 and Vue.js. Explore databases, use Ubuntu and MacOS, think about IT people and management

Notes


Gor tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.