Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to Local Web Server when I am Outside my LAN

I have a web server running out of my home. I have assigned it an address such as 192.168.1.123 on port 80.

I understand that this is running on my local network. If I go to another computer on my network and type in the server's ip address, I can see the server.

Is there a way to access this server from outside my LAN?

like image 863
Chris Avatar asked Sep 13 '11 15:09

Chris


People also ask

How can I access my server from outside of my LAN?

Use a VPN. If you connect to your local area network by using a virtual private network (VPN), you don't have to open your PC to the public internet. Instead, when you connect to the VPN, your RD client acts like it's part of the same network and be able to access your PC.

How can I access localhost from anywhere?

For Windows users, you'll need to make sure you have Python installed first. For macOS and Linux, you can use a simple cURL command to install it straight from your command line. It'll run through and sign you up to the service if you're not already signed up. Then you'll have localhost up and running for the world!


1 Answers

Yes, you need to set your router to forward connections to port 80 to your internal IP address (192.168.1.123). Look for Port Forwarding on your router admin screen which I would imagine you access by going to http://192.168.1.1

Keep in mind that your ISP may block port 80 completely in which case you can run your web server on a different port (for example por 8180) and have your router forward connections to port 8180 to your internal IP.

To access your server from outside, you just need to point your browser to your external IP address which you can find out by going to http://www.ipchicken.com

like image 70
Icarus Avatar answered Oct 08 '22 17:10

Icarus