Access localhost from the internet [closed]

故事扮演 提交于 2019-11-26 18:47:40

问题


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?

Thanks.


回答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).




回答2:


There are couple of good free service that let you do the same. Ideal for showing something quickly for testing:

  • http://localtunnel.me/
  • https://ngrok.com/
  • http://localhost.run/

Edits:

  • add ngrok service
  • add localhost.run service



回答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.




回答4:


You are accesing localhost, meaning you have a web server running on your machine. To access it from Internet, you need to assign a public IP address to your machine. Then you can access http://<public_ip>:<port>/. Port number is normally 80.




回答5:


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.




回答6:


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/




回答7:


Try with your IP Address , I think you can access it by internet.



来源:https://stackoverflow.com/questions/5108483/access-localhost-from-the-internet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!