I have installed Apache web server on my local linux machine.

Now, I followed the steps described here to do port forwarding.. I wanted my localhost to be accessible from outer web too.

Now, I am using D-Link DIR-605L router. and here's what I have done.

I have entered public port as 10000 and private port as 80. and entered the IP address as my machine's IP adddress.

Now from my machine (where I have installed the apache server), when I do

Router's Public IP Address:10000

It takes me to my homepage on webserver(localhost). But when I do it from a device that is not connected to my wifi, it says Web Page Not available.

Also, later I changed private port to 800, and in that case when I did

Router's Public IP Address:10000

it still worked. Now my questions are

  • The public port is that the people will use when accessing my webserver, and private port is the one where my localhost is listening. Now apache is always listening at 80 (by default). So when I change my private port to 800, how does <Router's Public IP Address>:10000 still work?
  • What do I do to make it work for everyone?

I am using DHCP server, not static IP.



Right now I have public port and private port both as 80. And still it is the same. I can access the localhost from the systems in the same network but not from an external system.

canyouseeme.org says that Error: I could not see your service on on port (80) Reason: Connection timed out

  • Can you hit your webserver from another machine on the internal network using the internal IP? Try both 80 and 800.
    – TTT
    Aug 7, 2014 at 18:55
  • @TTT Yeah, if I type 192.168.*.***:80 then I can connect it from another system on the same network.
    – Kraken
    Aug 7, 2014 at 18:57
  • @TTT Right now I have public and private port, both as 80.
    – Kraken
    Aug 7, 2014 at 18:58
  • @TTT canyouseeme.org says that Error: I could not see your service on on port (80) Reason: Connection timed out
    – Kraken
    Aug 7, 2014 at 19:01
  • Your router may be behind ISP NAT. What IP do you see as WAN IP when you goto the routers WAN settings?
    – Tutul
    Aug 8, 2014 at 3:16

1 Answer 1


Easier than using port forwarding is to put your PC IP in the DMZ, ie, outside the router firewall. You can also set the router to lease always the same IP to your computer, based on MAC address. Then you can use a service like NoIP or freedns.afraid.org to get a static hostname to your IP. But... if you are using a home connection (cable modem, DSL...) the operator will probably block incoming traffic - that is, you are behind the operator's NAT and you cannot configure port forwarding or DMZ in the operator's routers. Simply consider that your router is connected to another router, that is connected to another...

  • Oh, and port 80 (or any below 1024) is for sure blocked by the operator - as that is a service they sell as 'dedicated link'. Aug 7, 2014 at 19:08
  • but I did use port 10000 initially. It did not work.
    – Kraken
    Aug 7, 2014 at 19:09
  • but I can leave the private port as 80 right?
    – Kraken
    Aug 7, 2014 at 19:10
  • I've put my IP in DMZ, but it still does not work.
    – Kraken
    Aug 7, 2014 at 19:27
  • putting a machine in a DMZ just for web is a terrible idea. This leaves the machine vulnerable to all kinds of bad things.
    – Keltari
    Feb 29, 2016 at 19:06

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.