I want to turn a laptop with a broken monitor into a home web server behind a wireless router (buffalo airstation). I removed all ubuntu gui packages and installed lighttpd. The laptop has a fixed ip address

I set NAT on the router to forward port 22 to and ports 80 and 8080 to

Here is what I observe:

  1. wget on another linux box connected by a wire to the router works fine, firefox works too.

  2. ssh zzz.homelinux.org from outside of my network works fine, connecting me to as expected.

  3. neither wget zzz.homelinux.org nor wget zzz.homelinux.org:80 from outside of my LAN work:

    Connecting to zzz.homelinux.org|XXX.XXX.XXX.XXX|:80... failed: Connection timed out.
    Connecting to zzz.homelinux.org|XXX.XXX.XXX.XXX|:8080... failed: Connection timed out.

So, what am I doing wrong?


if 3 was conducted from inside your network, my top guess would be that your router does not have a feature known as NAT Loopback (also known as Loopback, Router Loopback and a few other names).

I would take a look in your router's configuration page to see if this can be turned on.

What you say is very normal and many off the shelf routers either do not have this feature or by default have it disabled - I needed to flash my Netgear router in order to provide this functionality.

Basically put, if you were to put your internal ip in to your hosts file, it would work fine - but, your router does not have a route or the ability set up in order to redirect an internal machine to a port on another internal machine via the external IP address.

You should get the same result by attempting to go to http://externalip:80 from an internal machine.

  • 1
    He could use a hosts file if he does not have NAT Loopback. – paradroid Sep 23 '11 at 1:09
  • @paradroid +1 ... I should have made that little test a bigger part of the answer as a possible solution! Long day... very tired! – William Hilsum Sep 23 '11 at 2:16

Many ISPs block port 80 on consumer grade connections. Some routers also use port 80 for their own web interface and as such block the port from external connections.

The simplest solution is to use an alternate port (in both situations) - and maybe use a dynamic dns service that handles port redirection. If its the router, you might be able to configure it to passthrough port 80 but that's router specific - it would involve turning external administration off, or switching its port


If your router does not have NAT Loopback, as Wil mentioned, you can add the following to the hosts file on all your LAN computers, so that they access the webserver from within your LAN, using the domain name:       zzz.homelinux.org

Is your router's Web interface on port 80/8080? Sometimes they have to be moved elsewhere so that NAT port routing to port 80/8080 on a device on the LAN makes it through.

Your Answer

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

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