Set up a Local Tunnel

Author

Paul van Genuchten

Published

January 5, 2023

This recipe describes an approach to temporarily host a local webservice as an online service. A utility opens a tunnel to a service provicer, the service provider routes all traffic for a specific domain via the tunnel to your machine. The tunnel stops if you quit the utility (ctrl-c).

This technology is for example relevant if you want to test a local service with the INSPIRE validator (which requires a service to be online).

Various (free) service providers exist offering this service:

Exercise

  • Verify a docker image is running, for example:

    docker run -p 80:80 -d uzyexe/tetris:latest
  • Enter this command:

    ssh -R 80:localhost:80 nokey@localhost.run
  • The utility will display a url on which the service will be available, try this url in your browser (and phone, to make sure it works also outside your computer)