Web-server – Setting up port forwarding for web server

port-forwardingrouterweb-server

This could belong on Super User, but I thought this place was more appropiate.

I want to run Apache in my computer and want to make it available to the outside world to test a couple things. Apparently, I have to go into my router's (a TP-LINK TD 8910G) settings and forward port 80 to my PC's IP. So far so good.

Thing is, since the router uses a web based interface and it's kind of stupid, it told me that since I was using port 80 for this, I should access its settings through port 8080. Maybe it can't detect requests coming from the LAN, I don't know. Point is, now neither port can't access the configuration, and I can't access Internet. Specifically, trying to access anything (including 192.168.1.1, the router's settings) through port 80 turns up a blank page (maybe if I had the server running in my computer I'd get something, but I don't want to risk trying, I had to reset the router and restore the settings), and port 8080 gives a "Can't establish connection" error in Firefox (and similar ones in other browsers).

Is there a way to configure the router to not redirect requests coming from inside the network?

I'm a beginner with this stuff, so please try to explain in a simple way. If this is more appropiate in Super User, I'm sorry.

Best Answer

  1. Make sure that the router's web-interface is set to not listen on the external interface. This can screw things up if it is listening on all interfaces.
  2. You should set the router to only forward packets coming from the external interface. So, the source interface should be just the external one.
  3. Alternatively, set your web-server as a DMZ device instead. This will forward all packets from the internet to your server on all ports.
  4. Alternatively, use a friendly router that runs dd-wrt instead and configure it from dd-wrt, which is quite powerful.
Related Topic