Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to expose my localhost to the WWW? (port forwarding?) [closed]

I am running Apache/php on my localhost and would like to be able to make this publicly accessible from the internet.

I think this is achieved by port forwarding? Can someone point me in the right direction?

like image 639
Andy Hin Avatar asked Jan 17 '11 20:01

Andy Hin


People also ask

How do I expose localhost ports from the internet?

Exposing localhost with cloudflare tunnels Just download and install the Cloudflare Tunnel CLI tool. Run the tunnel command and point it to the host port you want to serve and it will spit out a URL.

Why is my port forwarding closed?

Many reasons can cause this including improper router settings, improper configuration of the camera or the ISP blocking the port forwarding. Solutions: Step 1: Double check that the port forward settings on the router are correct.


2 Answers

Well sir you should try ngrok it is free and works with everything that I throw at him (node servers, xampp etc.)

like image 151
IGRACH Avatar answered Oct 16 '22 19:10

IGRACH


It depends on the connection you have.

If your machine has a public IP address, it's on the Internet already. Then all you need is to allow connections to port 80, both on the local firewall and the home/corporate firewall.

If your machine is behind a set-top-box, or inside a corporate network, chances are that you're not on the Internet. In some instances, a router does NAT (Network Address Translation) between a local (non-routable) network and the Internet. In this particular case, you need to set up port forwarding on the set-top-box or router.

like image 32
ChrisJ Avatar answered Oct 16 '22 21:10

ChrisJ