7

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 http://whatismyip.com, 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?

Hennes
  • 65,804
  • 7
  • 115
  • 169

1 Answers1

6

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.

Peter
  • 1,303
  • 1
  • 10
  • 17