'Access localhost from the internet [closed]

I need to forward my localhost for a short period of time for testing purposes. It has to be accessed from the public internet.

How can I achieve this?



Solution 1:[1]

You go into your router configuration and forward port 80 to the LAN IP of the computer running the web server.

Then anyone outside your network (but not you inside the network) can access your site using your WAN IP address (whatismyipcom).

Solution 2:[2]

There are a couple of good free services that let you do the same. Ideal for showing something quickly during development/testing:

Edits:

  • add ngrok service
  • add localhost.run service
  • 04/22 - add CloudFlare Tunnel

Solution 3:[3]

Even though you didn't provide enough information to answer this question properly, your best shots are SSH tunnels (or reverse SSH tunnels).

You only need one SSH server on your internal or remote network to provide access to your local machine.

You can use PUTTY (it has a GUI) on Windows to create your tunnel.

Solution 4:[4]

use your ip address or a service like noip.com if you need something more practical. Then eventually configure your router properly so incoming connection will be forwarded to the machine with the server running.

Solution 5:[5]

Open the port where your system is running (sample 8080). Open the port everywhere... Modem, firewalls, etc etc etc.

THen, send your ip + port to the person who will use it.

sample: http://200.200.200.200:8080/mySite/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dan Grossman
Solution 2
Solution 3 Pablo Santa Cruz
Solution 4 Rabib
Solution 5 renanleandrof