How can make a web server publicly accessible?

Recently I have installed LAMP server on Ubuntu Server and now my website is accessible from any device that is connected to my DSL modem (router). But I don't know how to make the server accessible from the Internet.

This is the output of ifconfig | grep inet:

inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0

Also when I connect to the Internet (from the same computer but with a different OS) and check , it says that my IP address is 151.246.99.56; when I load my router control panel page, in WAN Information column again I can see 151.246.99.56 as IP address.

I'm using a ZyXEL (P-660HW-T1 v3) router. What settings should I change to make my web server accessible from the Internet?

2

1 Answer

To make your server visible from outside your LAN, you will need the following:

  • Setup NAT on your router to point port 80 to the web server (or the port your web server listens to). In your case you should point that port to the server IP 192.168.1.50.
  • You could also use any service like DynDNS to access your webserver without having to know your public IP address. This is very usefull if your IP is dynamic and changes from time to time (or when you reboot your router).

With this changes, you should be able to access your local web server from the internet.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like