Exposing local networks to the Internet.

3 minute read

We’ll talk about how to make your local network services public today (internet). There are several methods for doing so, including port forwarding, router configuration, and so on. In this blog, we’ll use the SSH (secure shell) service and the localhost.run service.

localhost.run is a client-less tool to instantly make a locally running application available on an internet accessible URL.

To know morelocalhost.run

To make your local server available on the Internet, follow these steps:

  • Make sure SSH is installed in your device. To install for Windows. To install for Linux.
  • Start you Apache or any other operator’s server to setup HTTP server.

Terminal Command:

  • ssh-keygen

The command ssh-keygen will generate a RSA key so that localhost.run’s server can identify you.

While generating RSA key you will be asked to enter a passphrase it is recommended to use or you may leave it by entering it empty.

Terminal Command:

  • ssh -R 80:localhost:80 localhost.run

Here we are going to forward any server on our PORT 80 to localhost.run’s PORT 80 to make it available on internet.

Now you can get your public IP provide by localhost.run in your terminal. The IP address will be in the form of: (some strings).localhost.run

Now anyone who search for this IP from any part of the world will be forwarded to your local network and therefore can access your server.

This strategy can be applied to a wide variety of attack vectors. Example:

  • Credential Harvesting
  • Downloading backdoors on victim’s machine.
  • Rubber ducky attacks, etc.