Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
You need to do "port forwarding" in your router to make requests from the net continue to the local web server and not just stop at the router. Information is aplenty on the net using that key phrase. –  Daniel Andersson Feb 8 '13 at 8:54
    
Often, the problem is that your ISP is not forwarding port 80 or 8080 to you. –  user227746 May 29 '13 at 20:56

1 Answer 1

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.

share|improve this answer
    
Thank you! I will try your solution about setting up NAT as soon as possible and Also I have found this tutorial about it : link, but before any action now I really like to know how my server static IP (192.168.1.50) can be traced via Internet!? I think 192.168.1.50 is a very common IP address and it could be found on any computer around the world nonetheless how an outside network like Internet can identify this IP as an unique IP and forward its requests to my home server!? –  Omid Toraby Feb 9 '13 at 8:17
    
I did port-forwarding through NAT setup in router for IP 192.168.1.50 and port 80, but there is no difference! I can`t access to 192.168.1.50 through Internet. –  Omid Toraby Feb 9 '13 at 16:35
    
webserver is accessible through port 80 from LAN? When trying to load the server from outside, are you using your public IP address? –  Peter Feb 11 '13 at 9:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.