Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 from outside of my network works fine, connecting me to as expected.

  3. neither wget nor wget from outside of my LAN work:

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

So, what am I doing wrong?

share|improve this question

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.

share|improve this answer
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

share|improve this answer

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:
share|improve this answer

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .